Hi,
I forgot to reply to this. Just wanted to confirm your suggested solution
works Stuart, thanks for that and sorry for late response!
Rodrigo
On Tuesday, 18 February 2014 17:33:35 UTC, Rodrigo García Peláez wrote:
>
> Hi Stuart,
>
> I'm not very familiar with groovy but I think it makes sense :)
> I'll give that a go
>
> To be honest I hadn't tried again to sort this out because in the end I
> created a fixed job to deploy to the servers I had to, but it will be
> useful if I get it working for the future
>
> Thanks for your help! I'll post a reply here after I try it
> Regards
> Rodrigo
>
> On Monday, 17 February 2014 22:13:35 UTC, Stuart Rowe wrote:
>>
>> Hi Rodrigo,
>>
>> BuildFlow's parallel function takes a list or map of closures - it will
>> execute each in parallel.
>>
>> For your situation, you should iterate over your list of servers,
>> creating a
>> closure for each and adding it to list. This list can the be passed as an
>> argument to parallel().
>>
>> e.g.
>>
>> // create a closure for the deploy job for each server
>> def serverDeployJobs = []
>> for (server in servers) {
>> def deployJob = {
>> def jobParams = [:]
>> // set up params for deploy job on current server here...
>>
>> // call build
>> build(jobParams, DeployProjectName)
>> }
>> serverDeployJobs.add(deployJob)
>> }
>>
>> // schedule deploy jobs in parallel
>> parallel(serverDeployJobs)
>>
>> Hope that helps,
>> Stuart
>>
>>
>>
>> --
>> View this message in context:
>> http://jenkins-ci.361315.n4.nabble.com/Generating-parallel-flow-with-Build-Flow-Plugin-tp4687604p4691098.html
>>
>> Sent from the Jenkins users mailing list archive at Nabble.com.
>>
>
--
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].
For more options, visit https://groups.google.com/d/optout.