Is there a way to prevent stage from executing if a different stage is executing?
I need to prevent the deploy stage from executing if the test stage is executing. I know having them share the same agent is one way to block it, are there others? Below is my pipeline "group"
EX:
pipeline A
Stage 1 -> build and stage artifacts for testing and deployment
Stage 2 --> execute unit tests against build
stage 3--> deploy build to dev server
stage 4 --> execute smoke tests against deployed items
stage 5 --> execute acceptance tests against deployed items
Pipeline B (depends on A stage 5)
stage 1--> deploy build to test server
stage 2 --> execute smoke tests against deployed items
stage 3 --> execute acceptance tests against deployed items
Pipeline C (depends on B stage 3)
stage 1--> deploy build to production server
stage 2 --> execute smoke tests against deployed items
stage 3 --> execute acceptance tests against deployed items
Comments
1 comment
To prevent 2 different stages of different pipeline instances of the same pipeline from running at the same time, you can use the pipeline locking feature introduced in 2.0.
e.g. If pipeline A counter 2 is currently running, and you want to prevent another instance, say counter 3, of pipeline A from triggering, you can use this feature.
See: http://www.thoughtworks-studios.com/go/2.0/help/admin_lock_pipelines.html
http://www.thoughtworks-studios.com/go/2.0/help/configuration_reference.html#pipeline
-Yogi
Please sign in to leave a comment.