I am trying to create a job where I have to select multiple values for one parameter. env: dev1, dev2, qa1, qa2 etc I want to be able to select dev1 & dev2 to update certain values. Is there a way/plugin for Jenkins to handle it?
To install this plugin, you simply need to go to your jenkins instance and navigate to “/pluginManager/available”, and then search for “Extended Choice Parameter Plug-in” in the search box. Be careful! There is another plugin called “Extensible Choice Parameter Plug-in”.
Extended Choice Parameter plugin is the way to go for such requirement. You need to select Extended Choice Parameter
from the drop-down list as shown below:
In Name
text-box, assign a name. For example, Environment. This is the name with which you will be accessing all the values (dev1,dev2,...) that you will select while triggering the build. Now, in Simple Parameter Types
section, you will see another drop-down with the name Parameter Type
. Select Multi Select
from that drop-down. Now, in Choose Source for Value
section, enter the values (dev1,dev2,qa1,qa2,...) in Value
box. Comma (,) is the default delimiter. Refer screenshot below:
Once you are done with the above settings, you will then have to access the selected option in your script (using variable assigned to Name
as described above) and decide the course of action.
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