I'm using the Parameterized Build Plugin in Jenkins. I want to provide a link to the build page, but configure the default value for one of the fields that shows up in the form. This value is going to be different every time the job is run, but I want it to be configurable from some other page. Essentially I want to do something like click on a link that looks something like this:
https://jenkins/job/Sandbox/build?delay=0sec&Test=foo
And see this on the build screen:
So then I can fill out the rest of the values (or even modify the default value) and then click Build. Is this possible?
Using build parameters, we can pass any data we want: git branch name, secret credentials, hostnames and ports, and so on. 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.
In your Jenkins job configuration, tick the box named " This build is parameterized ", click the " Add Parameter " button and select the " String Parameter " drop down value. Latest Jenkins docs say that GET is depreciated for security reasons, so POST should be preferred.
This plugin lets you trigger new builds when your build has completed, with various ways of specifying parameters for the new build. These new builds appear as "Subprojects" in the Jenkins UI when you are looking at a project that triggers them.
To execute the Jenkins job from Jenkins web interface first go to respective project workspace and then click on “Build with Parameters” option from left panel. After that, you will be asked to choose/set parameter value (In my project I have set BROWSER parameter.)
Yes, it's absolutely doable - there is a plugin for that:
Build With Parameters Plugin.
Just install it and change the url to actually use the plugin:
https://jenkins/job/Sandbox/parambuild?Test=foo
And that's should do it...
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