Epligam
Epligam

Reputation: 783

Access Multi select values in Jenkins Extended Choice Parameters plugin

I’m using Extended Choice Parameters named Tasks in a job and the parameter type is Multi Select ( for example with these values: Start, Go, End), now how can I access the selected options ?

Meaning I want to create conditional step with Boolean condition so in case Start option was selected do X and another one in case Go option was selected do Y, The question is what should be the Token of the Conditional step ?

(I prefer not using script in order to get selected values.)

Upvotes: 1

Views: 6099

Answers (1)

TheEllis
TheEllis

Reputation: 1736

Assuming you are using the Conditional BuildStep plugin, you should be able to use the "Strings Match" condition to setup your conditional steps. See the screenshots below for an example:

enter image description here

enter image description here

If multiple options can be selected, you can still setup the job as describe above. The only thing you need to change is the type of condition. Instead of using String match, use Regular expression match. This way you can run multiple build steps if you have a composite value.

enter image description here

Upvotes: 2

Related Questions