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/groups/opt_out.

Reply via email to