I want to run multiple stages inside a lock within a declarative Jenkins pipeline:
pipeline { agent any stages { lock(resource: \'myResource\
This has been fixed.
You can now lock multiples stages by grouping them in a parent stage, like this :
stage('Parent') { options { lock('something') } stages { stage('one') { ... } stage('two') { ... } } }
(Don't forget you need the Lockable Resources Plugin)