Is it possible to lock multiple external resources to a build in Jenkins? We have tried the External Resource Dispatcher Plugin but did not succeed.
lock - the lock step throttles the number of concurrent builds in a defined section of the Pipeline. milestone - the milestone step automatically discards builds that will finish out of order and become stale.
It's not clear if your issue can be solved only through the External Resource Dispatcher plugin (which doesn't seem to have strong active development) but if you can afford to use the Lockable Resources Plugin as pointed by chown, there's a simplified syntax to lock multiple named resources in the Jenkins pipelines, as pointed in this support request:
pipeline {
agent any
options {
// Pipeline scoped multiple resource lock
lock(extra: [[resource: 'resa'], [resource: 'resb']])
}
stages {
stage('Build') {
steps {
// Stage scoped multiple resource lock
lock(extra: [[resource: 'resc'], [resource: 'resd']])
{
// ...
}
}
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With