Started by user pelaezr [EnvInject] - Loading node environment variables. Building on master in workspace /Users/jenkins/.jenkins/jobs/MULTI/workspace parallel { Schedule job GENERIC_DEPLOYMENT Build GENERIC_DEPLOYMENT #19 started GENERIC_DEPLOYMENT #19 completed Schedule job GENERIC_DEPLOYMENT Build GENERIC_DEPLOYMENT #20 started GENERIC_DEPLOYMENT #20 completed } Notifying upstream projects of job completion Finished: SUCCESS
But it doesn't seem to have run in parallel since it took 11 minutes and normally the GENERIC_DEPLOYMENT job takes about 5. This GENERIC_DEPLOYMENT should allow concurrent builds since it has ticked the check box with ""
Jenkins is configured at the moment with a max number of executors of 4 and no other jobs were running
What am I missing?
Thanks and regardsRodrigoversion = "4.1.0"
println "Deploying version " + version
def components = ["test1,test2"]
println components
def component = components.get(0)
println component
def values = component.split(',')
def jobsInParallel = [];
for ( myComponent in values ) {
println myComponent
def parallelJob = {
def jobParams = [:]
jobParams = myComponent
println jobParams
build (jobParams,Version:version)
}
jobsInParallel.add(parallelJob)
}
parallel(jobsInParallel)Deploying version 4.1.0
[test1,test2]
test1,test2
test1
test2
parallel {
test2
test2
Schedule job test2
Schedule job test2
Build test2 #1 started
Build test2 #1 started
test2 #1 completed
test2 #1 completed
}
Finished: SUCCESSversion = "4.1.0"
println "Deploying version " + version
def jobsList = ["test1,test2"] - list of jobs, but first element has all jobs
def jobNamesString= jobsList.get(0) // Get the comma delimited string of job names
def jobs= jobNamesString.split(',') // Creates an array of jobNames that can be iterated
// construct and collect closures for LATER execution
buildClosures = []
for (int i = 0; i < jobs.size(); i++) {
def jobName = jobs[i]
def curClosure = {
build(jobName,Version:version)
}
buildClosures.add(curClosure)
}
// execute the closures in buildClosures in parallel
parallel(buildClosures)