Re: For loop in the Jenkins build flow

2014-02-28 Thread Daniel Beck
In System Groovy build steps, this works: --- hudson.model.queue.QueueTaskFuture build(String fullName) { def p = jenkins.model.Jenkins.instance.getItemByFullName(fullName) def thisR = Thread.currentThread().executable def f = p.scheduleBuild2(p.quietPeriod, new hudson.model.Cause.UpstreamCaus

Re: For loop in the Jenkins build flow

2014-02-28 Thread dev123
gt;> for (int i=1; i<100; i++) { >> def curClosure = { >> build("a", STEP:i) >> } >> buildClosures.add(curClosure) >> } >> >> // execute the closures in buildClosures in parallel >> parallel(buildClosures) >> >> >

Re: For loop in the Jenkins build flow

2014-02-26 Thread Marc MacIntyre
uildClosures.add(curClosure) > } > > // execute the closures in buildClosures in parallel > parallel(buildClosures) > > > On Saturday, 22 February 2014 02:01:32 UTC-8, dev123 wrote: >> >> Is it possible to create a for loop in the jenkins build flow plugin DSL? >>

Re: For loop in the Jenkins build flow

2014-02-26 Thread Stuart Rowe
e closures in buildClosures in parallel parallel(buildClosures) On Saturday, 22 February 2014 02:01:32 UTC-8, dev123 wrote: > > Is it possible to create a for loop in the jenkins build flow plugin DSL? > Currently I have: > > parallel ( > { build( "a", STEP: 1) }, > { bu

For loop in the Jenkins build flow

2014-02-22 Thread dev123
Is it possible to create a for loop in the jenkins build flow plugin DSL? Currently I have: parallel ( { build( "a", STEP: 1) }, { build( "a", STEP: 2 ) }, { build( "a", STEP: 3 ) } ) Which I need to scale to e.g. 100 parallel executions. Therefore I ne