Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Block upstream jenkins job while downstream is running

I know about the build blocker plugin but doesn't seem to work. Running Jenkins 1.609.

Job A triggers Job B. I configured Job A to block if job B is running.

If you trigger A and while A is running you trigger A again, once the first A finishes, it triggers B. Then you get both A and B running which shouldn't happen. I guess that when the waiting A checks if B is running, it might be the case that Jenkins is in a middle state where it finished A but not yet really triggered B and therefore we get both of the jobs running.

How can I get this situation to work?

like image 942
Paulo Matos Avatar asked Nov 16 '25 18:11

Paulo Matos


1 Answers

No need to use plugin. I have been using below solutions for a year.

Job Config --> Advanced Project Options --> Block build when upstream project is building

enter image description here

like image 62
mainframer Avatar answered Nov 18 '25 12:11

mainframer