jenkins - Single parameter with multiple values - referencing extended-choice parameter values -
i stuck following situation in jenkins.
a job needs build multiple make targets. happen through multiple invocations of make per run allows 1 target @ time. want allow users select targets build each run.
i tried extended-choice parameter plugin (multi-select), not figure out how parse multiple values it, , how structure call make
can me this
extended-choice parameter list selected values target=value1,value2. @ best, can enforce values quoted target="value1,value2"
you have parse target value format want.
if pass targets make in sequence, make value1 value2, need change comma , in value of target space . didn't provide os, assume *nix. can use following ${target//,/ }
finally, since make not appear support multiple targets (according op), need loop.
so, in jenkins execute shell build step, type:
for currenttarget in ${target//,/ }; make $currenttarget done this equivalent to:
make value1 make value2 as order of thing: order of these values same defined in job configuration. doesn't matter in order user chooses these.
Comments
Post a Comment