jenkinsextended-choice-parameter

I want to select multiple choices by using extended choice parameter and from that choices i want to run job by pasing one sting match


enter image description here

enter image description here

As per log i have selected 3 choices[abc,cdf,mno] and i am matching [abc] and want to execute job or execute shell if choices contains [abc] as a sting. but i am unable to get expected output

Run condition [Or] enabling prebuild for step [Execute shell]
[ct_test] $ /bin/sh -xe /tmp/jenkins63839460640800445.sh
+ echo abc,cdf,mno
abc,cdf,mno
Strings match run condition: string 1=[abc,cdf,mno], string 2=[abc]
Strings match run condition: string 1=[abc,cdf,mno], string 2=[mno]
Run condition [Or] preventing perform for step [Execute shell]
Finished: SUCCESS

Solution

  • I'll suggest you using list parameter instead of choice selection. I think this will do the trick . First add this to your parameters Choice Parameter Selection Then run this pipeline and see if you outputting what you selected

    This is the pipeline code