Reputation: 570
I have been looking about this thing. Basically let´s say I have pipeline x and pipeline y, and pipeline x is trigerred whenever a commit is pushed, but I want this pipeline x to check if pipeline y is running and if so wait untill it finishes... is there any way to do this? I though of having global variables for Jenkins as flags but that would just stop from running no wait until the other job has finished
Upvotes: 0
Views: 841
Reputation: 10350
It seems like you want to have a set of mutually exclusive jobs.
You're in luck, since there's a couple of different plugins out there that can do this, one of which is: https://plugins.jenkins.io/build-blocker-plugin/
As long as your jobs use a naming convention that don't accidentally clash when waiting for one another, you should be safe.
Upvotes: 1