-
New Feature
-
Resolution: Duplicate
-
Minor
-
None
-
-
Declarative - 1.2
It would be useful to be able to lock multiple stages as a single lock. For example, we usually have a stage to deploy to an environment and then another stage to run end-to-end tests on that environment, but there should be no other concurrent deployments until both stages have completed.
Something like this:
pipeline { stages { lock(resource: 'myResource', inversePrecedence: true) { stage('Deploy') { // deploy to environment } stage('E2E') { // run tests on the environment milestone 1 } } } }
Technically both stages could just be merged into a single stage but to me that defeats the purpose of stages.
- duplicates
-
JENKINS-48380 Block-scoped "wrapper" options for individual stages
- Closed
-
JENKINS-46809 Allow sequential stages inside parallel in Declarative syntax
- Closed
- is duplicated by
-
JENKINS-45138 How do I `lock` outside of a step in a declarative pipeline job?
- Resolved
- relates to
-
JENKINS-45138 How do I `lock` outside of a step in a declarative pipeline job?
- Resolved
- links to