I am using the Jenkins Delivery Pipeline plugin. I have some parameterized builds that are manually triggered. If I trigger a build from the project page, the build shows a screen where parameters need to be defined (as expected). However, when I start a parameterized build from the Delivery Pipeline plugin, it just starts the build without offering a screen. This is strange behavior, is it possible to get the pipeline plugin to show the parameterized build screen?
Thanks for your help!
Show activity on this post. I don't have a depth knowledge of both plugin but from my experience, the subtle difference between the Delivery Pipeline Plugin and Build Pipeline Plugin is that the first one allows you to use Freestyle Jobs and Pipeline Jobs while the second one only allows Freestyle Jobs.
Any Jenkins job or pipeline can be parameterized. All we need to do is check the box on the General settings tab, “This project is parameterized”: Then we click the Add Parameter button.
Use Just Enough Pipeline Jenkins Pipeline (or simply Pipeline with a capital P) is a suite of plugins that supports implementing and integrating continuous delivery pipelines into Jenkins. This allows you to automate the process of getting software from version control through to your users and customers.
There are two types of pipelines in Jenkins: Declarative. Scripted.
I'm answering this question in general.
You need to use the Parameterized Trigger Plugin, or use the Build Pipeline Plugin. This issue with Delivery Pipeline plugin is still being solved by the Jenkins Team. See this link for the update about the issue at https://issues.jenkins-ci.org/browse/JENKINS-25685. You can get to know when it gets resolved from that link.
You can use the Build Pipeline plugin if it can be incorporated in your use case. There was a similar issue for the Build Pipeline plugin which is fixed now. It got fixed within 22 days (https://issues.jenkins-ci.org/browse/JENKINS-25427, https://github.com/jenkinsci/build-pipeline-plugin/pull/56). You can just hope that the same issue with the Delivery Pipeline plugin is fixed soon.
Can you provide me the version of Jenkins, environment and the plugin version? I can update my answer based on the answers you give.
When you are using the Delivery Pipeline plugin, and you have manually-triggered parameterized builds, as long as you configure the upstream job to pass along the parameters to the downstream job, when the "build trigger button" is clicked on the pipeline view page, the parameters are automatically passed along.
For instance, let's say you have a setup like this:
Compile_Project ---> Deploy_Project
Let's assume that you are passing a variable called versionNumber
from the Compile_Project
to the Deploy_Project
jobs. Let's also assume that you're using Subversion for your SCM, and your versionNumber
looks like 1.0.${SVN_REVISION}
. ${SVN_REVISION}
is automatically provided by Jenkins, so your version number will look something like 1.0.1234
, where 1234
is the commit number provided by Subversion.
On your Delivery Pipeline view, let's say that it's configured to show 3 pipeline instances, and that manual triggers are enabled in the view settings. Your pipeline view page might look something like this (yay ASCII art!):
Compile_Project ---> Deploy_Project (>)
Compile_Project ---> Deploy_Project (>)
Compile_Project ---> Deploy_Project (>)
In this case, I'm using (>)
to represent the manual trigger button. The button on the bottom would attempt to deploy version 1.0.1234
, the middle button would attempt to deploy version 1.0.1235
, and the top button would attempt to deploy version 1.0.1236
, assuming your project has gotten consecutive SVN commits.
In order to pass the parameter from the Compile_Project
to the Deploy_Project
job, you need to do the following. (Note: it sounds like you've already done this part, but I'm including it just in case you might have missed a step, and also for the sake of completeness.)
In the Compile_Project
job's configuration, as a Post-Build Action, choose "Build other projects (manual step)". In the "Downstream project names" box, enter Deploy_Project
, and then from the "Add Parameters" drop-down, select "Predefined Parameters". In the "Parameters" text area that appears, create a parameter to pass along, which I'll call VERSION_NUMBER
. What you'll enter in the text area is then VERSION_NUMBER=1.0.${SVN_REVISION}
. This will enable the parameter to get passed from the Compile_Project
to the Deploy_Project
. However, you're not quite done yet.
In the Deploy_Project
job's configuration, you need to set it up to accept the parameter you're passing into the job. To do so, configure the Deploy_Project
, and check the "This build is parameterized" checkbox. Then add a String parameter from the "Add parameter" drop-down. In the "Name" field, enter VERSION_NUMBER
. At this point, you can then use ${VERSION_NUMBER}
in the Deploy_Project
's configuration wherever you need in order to specify the correct version number of the project to deploy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With