Issue
I have the below Extended Choice Parameter in my Job:
In case I choose both values, how can I loop thought it in my jenkinsfile
?
sh "docker run --rm --net=host -v ${WORKSPACE}:/app/ ${MyImage} --env ${ENV}"
Solution
This is what I used (with the help of this post: Single parameter with multiple values - referencing extended-choice parameter values):
str = env.ENV.split(',')
for (String values :str)
sh "docker run --rm --net=host -v ${WORKSPACE}:/app/ ${MyImage} --env $values"
Answered By - arielma
Answer Checked By - Cary Denson (JavaFixing Admin)