Depending on your job, you'll want to add some kind of bogus parameter to the jobs to prohibit deduplication, since Jenkins can coalesce jobs that are run with the same parameters in the queue. I use the current system time in millis.
On Wed, Feb 26, 2014 at 2:23 PM, Stuart Rowe <stuartr...@gmail.com> wrote: > parallel() can take a list/map of closures > > you will want to do this: > > // construct and collect closures for LATER execution > buildClosures = [] > 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) > > > 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) }, >> { build( "a", STEP: 2 ) }, >> { build( "a", STEP: 3 ) } >> ) >> >> Which I need to scale to e.g. 100 parallel executions. Therefore I need >> to be able to do something like: >> >> parallel ( >> >> for (int i=1; 1<100; i++) { >> { build( "a", STEP: i) } >> } >> ) >> >> But that gives an error. >> > -- > 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 jenkinsci-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- Marc MacIntyre -- 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.