Reputation: 7805
Is it possible to start running Jenkins jobs simultaneously in such way that in case when some of the configurations couldn't be started "parent" job waits until all of them could be initiated in sync?
I've already checked Matrix Project and Pipeline plug-ins for starting jobs in parallel, but it seems both of them are missing possibility to freeze execution until all configuration could be started at the same time.
Upvotes: 3
Views: 1372
Reputation: 25451
In Pipeline you could do something like (untested)
def count = 0
parallel a: {
node {
count++
waitUntil {count == 3}
sh 'make CONFIG=a'
}
}, b: {
node {
count++
waitUntil {count == 3}
sh 'make CONFIG=b'
}
}, c: {
node {
count++
waitUntil {count == 3}
sh 'make CONFIG=c'
}
}
It is not generally a good idea, since you can effectively deadlock waiting for all three nodes to be locked simultaneously.
Upvotes: 1