I tried the Groovy plugin and also the Build Flow Plugin...

I can get multiple jobs started in parallel but I can't get the parameter 
to pass to the child jobs.

import hudson.model.*
def inputParameter = build.buildVariableResolver.resolve("inputParameter")
def branches = [:]
def int i = 0 
inputParameter.replaceAll("^[,\\s]+", "").split("[,\\s]+").each {
  branches["branch${i}"] = { 
    build('aa', Param1: [[$class: 'StringParameterValue', name: 
'inputParameter', value: "${it}"]])
  }
  i++
}
parallel branches



On Friday, December 9, 2016 at 8:54:45 AM UTC-6, Bryce Pepper wrote:

> I would like to start a new jenkins job for each word passed in a 
> parameter.
>
> I could use a post
>
> for eachWord in ${inputParameter//,/ }; do
> {
>   curl -X POST --silent --show-error --user user:token \
>         
> $JENKINS_URL/job/testJob/buildWithParameters?inputParameter=${eachWord}
> }
> done
>
> but I was hoping for a way to passthru the credentials of the user running 
> the parent job.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6b1184e3-5136-4034-b2b4-011437354b5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to