Configure block equivalent for Jenkins 2.0 Pipeline - jenkins

For the Job DSL Plugin (https://github.com/jenkinsci/job-dsl-plugin) you can script your Jenkins jobs using this plugins DSL script with the help of their built in methods to support most plugins.
When you encounter a plugin that is not yet supported you can still use it by using a "Configure" block (https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block) that tells the plugin how to build the XML manually.
Is there an equivalent feature for the new Jenkins 2.0 pipeline (https://jenkins.io/solutions/pipeline/) to support plugins that are either not updated often or at least until the plugin author adds support?

You should have a look at new Jenkinsfile capabilities. In essence, you can now configure your entire job using the Jenkinsfile and pipeline approach.

Related

How to develop groovy script effectively for Jenkins pipeline?

I'm very new to Jenkins pipeline and trying to write some Groovy scripts in pipeline. Now, I'm using declarative pipeline and writing Groovy code in Jenkins UI itself which is not helping with auto-population of methods on objects, auto-import etc.
Generally when we use IDE like eclipse, Intellij Idea for Java programming, we can see respective imports are automatically added in the code and also autosuggestion is supported.
How can I groovy code effectively for Jenkins pipeline which would save my time and help with autom-suggestion of methods, imports, compilation error etc?
I have achieved auto-import, auto-completion (and somewhat unit-testing) in IntelliJ using this setup.
The caveat is that I'm using scripted pipeline and the setup is also used for Groovy scripts for Jenkins hooks and Jenkins shared library.

Is it possible to use external jars via #grab from inside the Jenkins groovy postbuild plugin?

I want to send some specific notifications (REST API) back to our server, which triggered our Jenkins build jobs via REST API. For this, I am about to include a jar of our own, which has a lot of convenience methods in it.
I am able to use the jars inside the Groovy Script by utilizing #Grab, that's fine.
But it doesn't seem to work from within Groovy Postbuild Plugin.
It even doesn't recognize referenced script files from within another package, which is next to the script file.
Is there a workaround? How can I send my specific notification using java or groovy and the methods provided in our own jar? Do I need to write a Jenkins Plugin for this (hope not). Thanks in advance, Anne
I would actually recommend to changing your jobs over to Jenkins Declarative pipeline. Then you can use the post handling built into the Jenkins pipeline language. You then have some options. You could use the pipeline steps provided by the HTTP Request plugin to call REST APIs, create a Java tool to call your REST APIs using your Jar library (install as a custom tool which can be used from pipeline) or write a custom plugin to provide the pipeline steps. If you decide to write a plugin have a look at the Webhook Step plugin for how to do it - https://github.com/jenkinsci/webhook-step-plugin. Your best bet might be a custom Java command line tool called from a pipeline shell step (sh or bat) depending on the agent / slave OS you use.

Jenkins manages groovy scripts without scriptler plugin

Since scriptler plugin has some security issues and it's not safe for use, what is the alternative plugins to manage the groovy scripts ?
Can you configure your job as a pipeline? If so, Groovy can be run inside the pipeline steps.
Also, maybe check the suggestions here:
Replacement for Jenkins Scriptler plugin?

AbstractMethodError while running Pipeline

I have a Jenkinsfile that runs a pipeline. The pipeline runs correctly on one instance of Jenkins, so I believe there isn't a problem with my script.
I am now trying to copy the job over to another instance, but I get the following error in the console output:
Started by user
[Pipeline] End of Pipeline
java.lang.AbstractMethodError: Method org/jenkinsci/plugins/workflow/cps/global/UserDefinedGlobalVariableList.iterator()Ljava/util/Iterator; is abstract
at org.jenkinsci.plugins.workflow.cps.global.UserDefinedGlobalVariableList.iterator(UserDefinedGlobalVariableList.java)
at org.jenkinsci.plugins.workflow.cps.GlobalVariable$1$1.expand(GlobalVariable.java:74)
at org.jenkinsci.plugins.workflow.cps.GlobalVariable$1$1.expand(GlobalVariable.java:71)
at hudson.util.Iterators$FlattenIterator.hasNext(Iterators.java:74)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:100)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15)
at WorkflowScript.run(WorkflowScript:3)
at ___cps.transform___(Native Method)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:55)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:40)
at com.cloudbees.groovy.cps.Next.step(Next.java:58)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:297)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:78)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:206)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:204)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE
Jenkinsfile for reference:
#!/usr/bin/env groovy
node {
stage('build')
echo 'hello world'
}
I believe I've messed up a plugin, but not sure which one. Here's the list of installed plugins and also the installed version of Jenkins:
Jenkins v1.651.3
=========
Ant Plugin
Uses the OWASP Java HTML Sanitizer to allow safe-seeming HTML markup to be entered in project descriptions and the like.
1.2
Artifact Deployer Plug-in
This plug-in makes it possible to deploy artifacts from workspace to output directories.
0.33
Artifactory Plugin
This plugin allows deploying maven artifacts and build info to Artifactory.
2.4.7
Async Http Client
This plugin provides a shared dependency on the async-http-client library so that other plugins can co-operate when using this library.
1.7.24
Authentication Tokens API Plugin
This plugin provides an API for converting credentials into authentication tokens in Jenkins.
1.2
Branch API Plugin
This plugin provides an API for multiple branch based projects.
1.11
Build Authorization Token Root Plugin
Lets build and related REST build triggers be accessed even when anonymous users cannot see Jenkins.
1.4
Build Pipeline Plugin
This plugin renders upstream and downstream connected jobs that typically form a build pipeline. In addition, it offers the ability to define manual triggers for jobs that require intervention prior to execution, e.g. an approval process outside of Jenkins.
1.5.2
build timeout plugin
This plugin allows builds to be automatically terminated after the specified amount of time has elapsed.
1.16
Build Trigger Badge Plugin
This plugin displays an icon representing the cause of a construction.
2.2
Build With Parameters
Allows the user to provide parameters for a build in the url (similar to /job/JOBNAME/buildWithParameters), prompting for confirmation before triggering the job.
1.3
build-name-setter
This plug-in sets the display name of a build to something other than #1, #2, #3, ...
1.5.1
CCCC Plug-in
This plugin parses CCCC output files to produce project and build reports.
0.6
CloudBees Docker Build and Publish plugin
This plugin enables building Dockerfile based projects, as well as publishing of the built images/repos to the docker registry.
1.2.2
CloudBees Docker Hub/Registry Notification
Integrates Jenkins with DockerHub and Docker Registry
2.0
CloudBees Docker Traceability
Provides an ability to trace server deployments via fingerprints
1.2
Cobertura Plugin
This plugin integrates Cobertura coverage reports to Jenkins.
1.9.7
Config File Provider Plugin
Ability to provide configuration files (e.g. settings.xml for maven, XML, groovy, custom files,...) loaded through the UI which will be copied to the job workspace.
2.10.1
Confluence Publisher
This plugin allows you to publish build artifacts into a Confluence wiki page. Currently limited to uploading an artifact as an attachment to a page id.
1.8
Copy Artifact Plugin
Adds a build step to copy artifacts from another project.
1.37
Credentials Binding Plugin
Allows credentials to be bound to environment variables for use from miscellaneous build steps.
1.10
Credentials Plugin
This plugin allows you to store credentials in Jenkins.
2.1.1
Crowd 2 Integration
This plugin enables use of Atlassian Crowd as an authentication source. It uses Crowd's REST API (available since Crowd 2.1) to access the services and supports single-sign-on.
1.9-SNAPSHOT (private-04/03/2015 19:47-arnaud)
Cucumber Plugin
run cucumber tests under jenkins CI
0.0.2
Cucumber reports
This project provides pretty html reports for Cucumber. It works by generating html from the cucumber json report formatter. Can be used anywhere a json report is generated (Java, Ruby, JavaScript and other implementations).
3.6.0
CVS Plug-in
Integrates Jenkins with CVS version control system using a modified version of the Netbeans cvsclient.
2.12
Deploy to container Plugin
This plugin allows you to deploy a war to a container after a successful build.
Glassfish 3.x remote deployment
1.10
Deploy to Websphere container Plugin
1.0
deployment-notification
This plugin provides abstract common parts for integration with configuration management tools like Chef and Puppet.
1.4
Discard Old Build plugin
This plugin enables detail configuration to discard old builds like using logfile size / status / days/ intervals days / build num / logfile regular expression.
1.05
disk-usage plugin
This plugin counts disk usage.
0.28
Docker Commons Plugin
Provides the common shared functionality for various Docker-related plugins.
1.6
Docker Pipeline
Build and use Docker containers from pipelines.
1.6
Docker plugin
This plugin integrates Jenkins with Docker
0.16.0
docker-build-step
This plugin allows to add various docker commands to your job as build steps.
1.39
Durable Task Plugin
Library offering an extension point for processes which can run outside of Jenkins yet be monitored.
1.9
Dynamic Parameter Plug-in
This plugin allows build parameters with dynamically generated default values.
0.2.0
Email Ext Recipients Column Plugin
This plugin is a sample to explain how to write a Jenkins plugin.
1.0
Email Extension Plugin
This plugin is a replacement for Jenkins's email publisher
2.41.3
Email Extension Template Plugin
This plugin allows administrators to create global templates for the Extended Email Publisher.
0.4
Environment Dashboard Plugin
This plugin is used to generate the Environment Dashboard.
1.1.4
Environment File Plugin
This plugin can be used to set environment variables from a file.
1.2
Environment Injector Plugin
This plugin makes it possible to set an environment for the builds.
1.92.1
export dynamic job data
This plugin exports Jenkins runtime job parameters into a properties file.
0.4
Extended Choice Parameter Plug-In
Adds extended functionality to Choice parameter
0.74
Extensible Choice Parameter plugin
Extensible Choice Parameter provides several ways to retrieve choices, including the way to share choices among all jobs.
1.3.2
External Monitor Job Type Plugin
Adds the ability to monitor the result of externally executed jobs
1.4
Flexible Publish Plugin
Choose the order of publisher execution and make the execution conditional
0.15.2
Folders Plugin
This plugin allows users to create "folders" to organize jobs. Users can define custom taxonomies (like by project type, organization type etc). Folders are nestable and you can define views within folders. Maintained by CloudBees, Inc.
5.12
Gatling Jenkins Plugin
This plugin integrates Gatling simulation reports into Jenkins.
1.1.1
Git Changelog
Plugin creating JIRA filter URL based on commit messages containing JIRA ticket keys in the GIT history
1.2
Git client plugin
Utility plugin for Git support in Jenkins
1.19.6
Git Parameter Plug-In
Adds ability to choose from git repository revisions or tags
0.4.0
Git plugin
This plugin integrates Git with Jenkins.
2.5.2
GIT server Plugin
Allows Jenkins to act as a Git server.
1.6
Git Tag Message Plugin
Exports the message for a git tag as an environment variable during a build.
1.4
git-notes Plugin
Add git-notes with Jenkins build status!
0.0.4
Gitcolony Build Notification plugin
This plugin updates live branch build status in Gitcolony.
1.1
GitHub API Plugin
This plugin provides GitHub API for other plugins.
1.71
GitHub Authentication plugin
This is the an authentication plugin using github OAuth.
0.22.2
GitHub plugin
This plugin integrates GitHub to Jenkins.
1.16.0
Gradle Plugin
This plugin allows Jenkins to invoke Gradle build scripts directly.
1.24
Green Balls
Because green is better than blue! For color blind support configure user property.
1.15
Groovy
This plugin executes Groovy code.
1.3
HP Application Automation Tools
This plugin allows integration with HP ALM, HP Unified Functional Testing, HP LoadRunner and HP Performance cente
4.0.1
HPE Security Fortify Jenkins Plugin
HPE Security Fortify Jenkins Plugin, publish FPR result in Project page, upload FPR to Software Security Center (SSC), consider a build as fail if too many vulnerabilities
1.16.10
HTML Publisher plugin
This plugin publishes HTML reports.
1.11
HTTP Request Plugin
This plugin sends a http request to an url with some parameters. See the release notes for changes and compatibility https://github.com/jenkinsci/http-request-plugin/releases
1.8.11
Hudson SCP publisher plugin
This plugin uploads build artifacts to repository sites using SCP (SSH) protocol.
1.8
Icon Shim Plugin
Allows plugins make full use of the <l:icon> layout tag when running on newer versions of Jenkins, while still being compatible with older versions.
2.0.3
JaCoCo plugin
1.0.16
Javadoc Plugin
1.3
JavaScript GUI Lib: ACE Editor bundle plugin
JavaScript GUI Lib: ACE Editor bundle plugin.
1.1
JavaScript GUI Lib: Handlebars bundle plugin
JavaScript GUI Lib: Handlebars bundle plugin.
1.1
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin.
1.2.1
JavaScript GUI Lib: Moment.js bundle plugin
JavaScript GUI Lib: Moment.js bundle plugin.
1.1
JIRA plugin
This plugin integrates Jenkins to Atlassian JIRA.
2.1
Job Configuration History Plugin
Job history plugin for Jenkins.
2.13
Job DSL
This plugin allows Jobs and Views to be defined via DSLs
1.45
Job Import Plugin
The Job Import Plugin lets you import jobs from another Jenkins instance.
1.3.1
Job/Queue/Slaves Monitoring Plugin
This plugin shows different information about the queue, slaves and jobs in jenkins.
1.4
jQuery plugin
This allows other plugins to use jQuery in UI.
1.11.2-0
jQuery UI plugin
This plugin allows you to use jQuery UI on view descriptions.
1.0.2
JUnit Plugin
Allows JUnit-format test results to be published.
1.10
Kubernetes plugin
Jenkins plugin to run dynamic slaves in a Kubernetes/Docker environment
0.7
LDAP Plugin
Adds LDAP authentication to Jenkins
1.11
Mailer Plugin
This plugin allows you to configure email notifications for build results
1.16
Managed Scripts
This plugin allows to centrally manage shell scripts and reference these as build steps in your builds.
1.2.1
MapDB API Plugin
This plugin provides a shared dependency on the MapDB library so that other plugins can co-operate when using this library.
1.0.6.0
Mask Passwords Plugin
This plugin allows masking passwords that may appear in the console.
2.8
Matrix Authorization Strategy Plugin
Offers matrix-based security authorization strategies (global and per-project).
1.2
Matrix Project Plugin
Multi-configuration (matrix) project type.
1.6
Maven Integration plugin
This plug-in provides, for better and for worse, a deep integration of Jenkins and Maven: Automatic triggers between projects depending on SNAPSHOTs, automated configuration of various Jenkins publishers (Junit, ...).
2.12.1
Maven Metadata Plugin for Jenkins CI server
Adds a build parameter that presents versions of an artifact from a maven repository as a drop down list.
1.5.0
Monitoring
Jenkins' monitoring with JavaMelody. Open report after installation.
1.59.0
Multiple SCMs plugin
This plugin enables the selection of multiple source code management systems for a build. For example, it enables checking out the source code from one SCM while checking out legacy or third-party code from another.
0.6
Next Build Number Plugin
Sets the build number Jenkins will use for a job's next build
1.4
NodeJS Plugin
NodeJS Plugin executes NodeJS script as a build step.
0.2.1
OpenShift Deployer Plugin
This plugin enable Jenkins jobs to create containers(gears) on OpenShift and deploy applications to it
1.2.0
OpenShift Pipeline Jenkins Plugin
This plugin facilitates the construction of jobs, pipelines, and workflows that operate on a Kubernetes based OpenShift server.
1.0.21
OpenShift Sync
Syncs OpenShift BuildConfigs with Jenkins jobs
0.0.11
OWASP Markup Formatter Plugin
Uses the OWASP Java HTML Sanitizer to allow safe-seeming HTML markup to be entered in project descriptions and the like.
1.3
PAM Authentication plugin
Adds Unix Pluggable Authentication Module (PAM) support to Jenkins
1.2
Parameterized Remote Trigger Plugin
This plugin triggers a job on a remote Jenkins host
2.2.2
Parameterized Trigger plugin
2.30
Performance Plugin
This plugin integrates JMeter reports, JUnit reports, wrk output, and Iago reports into Hudson.
1.13
Pipeline
A suite of plugins that lets you orchestrate automation, simple or complex. See Pipeline as Code with Jenkins for more details.
2.5
Pipeline Graph Analysis Plugin
Provides a REST API to access pipeline and pipeline run data.
1.3
Pipeline: API
Plugin that defines Pipeline API.
2.1
Pipeline: Basic Steps
Commonly used steps for Pipelines.
2.4
Pipeline: Build Step
Adds the Pipeline step build to trigger builds of other jobs.
2.4
Pipeline: Declarative Extension Points API
APIs for extension points used in Declarative Pipelines.
1.1.1
Pipeline: GitHub Groovy Libraries
Allows Pipeline Grrovy libraries to be loaded on the fly from GitHub.
1.0
Pipeline: Groovy
Pipeline execution engine based on continuation passing style transformation of Groovy scripts.
2.9
Pipeline: Input Step
Adds the Pipeline step input to wait for human input or approval.
2.5
Pipeline: Job
Defines a new job type for pipelines and provides their generic user interface.
2.3
Pipeline: Milestone Step
Plugin that provides the milestone step
1.3
Pipeline: Model API
Model API for Declarative Pipeline.
1.1.1
Pipeline: Model Definition
An opinionated, declarative Pipeline.
1.1.1
Pipeline: Multibranch
Enhances Pipeline plugin to handle branches better by automatically grouping builds from different branches.
2.9.2
Pipeline: Nodes and Processes
Pipeline steps locking agents and workspaces, and running external processes that may survive a Jenkins restart or slave reconnection.
2.10
Pipeline: REST API Plugin
Provides a REST API to access pipeline and pipeline run data.
1.5
Pipeline: SCM Step
Adds a Pipeline step to check out or update working sources from various SCMs (version control).
2.2
Pipeline: Shared Groovy Libraries
Shared libraries for Pipeline scripts.
2.7
Pipeline: Stage Step
Adds the Pipeline step stage to delineate portions of a build.
2.2
Pipeline: Stage Tags Metadata
Library plugin for Pipeline stage tag metadata.
1.1.1
Pipeline: Stage View Plugin
Pipeline Stage View Plugin.
2.6
Pipeline: Step API
API for asynchronous build step primitive.
2.9
Pipeline: Supporting APIs
Common utility implementations to build Pipeline Plugin
2.13
Plain Credentials Plugin
Allows use of plain strings and files as credentials.
1.1
Port Allocator Plug-in
This plugin allocates free ports as environment variables.
1.8
Post-Build Script Plug-in
No description available.
0.17
Promoted Builds (Simple)
Simpler version of Promoted Builds plugin, with only manual promotion of builds.
1.9
promoted builds plugin
This plugin implements a "promoted build" feature where a build of one job can be marked as "promoted" when it passes certain criteria.
2.27
Publish Over SSH
Send build artifacts over SSH
1.14
PWauth Security Realm
This plug-in adds authentication via pwauth and supports both *nix system users and groups through PAM.
0.4
ready-api-jenkins-plugin
The Ready! API Plugin can be used to start and stop ServiceV Virts during your builds.
1.8.5
Reverse Proxy Auth Plugin
1.4.0
Role-based Authorization Strategy
Enables authorization using a role-based strategy.
2.3.2
ruby-runtime
Hosts runtime for enabling pure-Ruby plugins
0.12
Run Condition Extras Plugin
Plugin provides extra run conditions and plugin integrations for Run Conditions Plugin.
0.2
Run Condition Plugin
Define conditions for the execution of build steps
1.0
Safe Restart Plugin
This plugin allows you to restart Jenkins safely.
0.3
sbt plugin
This plugin allows running SBT empowered scala projects in Hudson.
1.5
SCM API Plugin
This plugin provides a new enhanced API for interacting with SCM systems.
1.2
Scoverage Plugin
Scoverage Plugin
1.3.2
Script Security Plugin
Allows Jenkins administrators to control what in-process scripts can be run by less-privileged users.
1.21
Scriptler
Scriptler allows you to store/edit/execute groovy scripts on any of the slaves/nodes... no need for copy paste groovy code anymore. Beside administer your scripts, Scritpler also provides a way to share scripts between users via hosted script catalogs on the internet.
2.9
Security Realm by custom script
This plugin adds authentication via user-defined script, in additon to the orignal script-realm, this one also supports groups.
1.5
Selenium HTML report
This is an jenkins plugin to visualize the results of selenium tests
1.0
Shared Objects Plugin
This plugin makes it possible to populate as environment variables some objects such as public file paths, Clearcase objects, locations of installed tools and so on. This plugin contributes to the EnvInject plugin.
0.44
SonarQube Plugin
This plugin allows an easy integration of SonarQube, the open source platform for Continuous Inspection of code quality.
2.3
SSH Agent Plugin
1.9
SSH Credentials Plugin
Allows storage of SSH credentials in Jenkins
1.11
SSH plugin
This plugin executes shell commands remotely using SSH protocol.
2.4
SSH Slaves plugin
Allows to launch agents over SSH, using a Java implementation of the SSH protocol
1.10
Static Analysis Collector Plug-in
This plug-in is an add-on for the plug-ins Checkstyle, Dry, FindBugs, PMD, Tasks, and Warnings: the plug-in collects the different analysis results and shows the results in a combined trend graph. Additionally, the plug-in provides health reporting and build stability based on these combined results.
1.47
Static Analysis Utilities
This plug-in provides utilities for the static code analysis plug-ins.
1.76
Structs Plugin
Library plugin for DSL plugins that need names for Jenkins objects.
1.4
Subversion Plug-in
2.5.7
TestNG Results Plugin
This plugin integrates TestNG test reports to Jenkins.
1.13
ThinBackup
Backs up the most important global and job specific configuration files.
1.7.4
Timestamper
Adds timestamps to the Console Output
1.7.2
Token Macro Plugin
This plug-in adds reusable macro expansion capability for other plug-ins to use.
1.12.1
Translation Assistance plugin
1.12
Validating String Parameter Plugin
Adds a new parameter type called Validating String Parameter which supports regular expression validation of a user entered parameter.
2.3
WAS Builder Plugin
This plugin adds an "IBM WebSphere Application Server 6.x/7.x" builder which allows running wsadmin commands (or scripts) from a job.
1.6.1
WebSphere Deployer Plugin
Deploys your web artifacts automatically to IBM WebSphere Application Server and IBM WebSphere Liberty Profile
1.3.4
Windows Slaves Plugin
Allows you to connect to Windows machines and start slave agents on them.
1.1
Zentimestamp plugin
Plugin that allows the customization of the date and time pattern for the Jenkins BUILD_TIMESTAMP variable.
4.2
The following line gives the hint, where the error occurs in your pipeline script:
at WorkflowScript.run(WorkflowScript:3)
While line 3 in the pasted script is the node, I assume that something is odd with numbering and see an error in the parameters call (which would be line 3, if you start from the first line where the script starts.. not sure if this makes sense).
The reason, why this parameters would fail is that you copied this snippet from a Declarative Pipeline, but (as you don't have the pipeline wrapper, you're running a Scripted Pipeline.
For scripted pipelines, you have to use the build properties to define the parameters:
properties([
parameters([
string(name: 'dockerTag', defaultValue: '1.0', description: 'What is the docker tag?')
])
])
(as this is not obvious and not very well documented, I wrote a blog post a few months ago)
Yes
The following line gives the hint, where the error occurs in your pipeline script:
at WorkflowScript.run(WorkflowScript:3)
While line 3 in the pasted script is the node, I assume that something is odd with numbering and see an error in the parameters call (which would be line 3, if you start from the first line where the script starts.. not sure if this makes sense).
The reason, why this parameters would fail is that you copied this snippet from a Declarative Pipeline, but (as you don't have the pipeline wrapper, you're running a Scripted Pipeline.
For scripted pipelines, you have to use the build properties to define the parameters:
properties([
parameters([
string(name: 'dockerTag', defaultValue: '1.0', description: 'What is the docker tag?')
])
])
(as this is not obvious and not very well documented, I wrote a blog post a few months ago)

How to invoke a plugin from Jenkins build pipeline

I have pipeline job in my Jenkins 2.x installation. In one of my steps I want to invoke a third party plugin that hasn't been updated to support pipeline jobs.
How can I invoke that plugin and have it run from my pipeline?
Use snippet generator and look for step there, and you will see a list of plugins.
It works for some plugins only, so if yours is not there you are out of luck.

Resources