Search code examples
jenkinsbuttonbuildparameters

Have more than one Build button for a parameter based job


In Jenkins, I created a job with parameters (string, validating string, choice, dynamic choice, blah de blah etc kind).

Now, When I go to the job, I see "Build with Parameters" link on the left hand side. I click on it and I see a nice parameter/arguments (what I configured in the job) on HTML front.

At the bottom of these parameters, there's a button "Build" (This means, once you provide the values to the parameters and click the Build button, it'll initiate the Jenkins job and whatever the job's is configured to do (with/without those arguments/parameters passed), it'll do it.

Now, what I need is:

  1. Is there's any way, I can have two or more of such "Build" buttons at the same time? i.e. PS attached image.

  2. If only one Build box is allowed/available, can I place a check box (a parameter), which when checked/unchecked, change the number / name of parameters for this job.

enter image description here


Solution

  • I don't know if this is what you actually looking for, but maybe this plugin can help: https://wiki.jenkins-ci.org/display/JENKINS/Dynamic+Parameter+Plug-in

    This way you'll be able to change the parameters by the answer of the user's input, and build accordingly.

    Hopes this helps