I have a Jenkins pipeline that has 6 stages.
In 4 of the 6 stages the pipeline triggers Jenkins jobs using build job
.
Both the pipeline and the job are set to allow concurrent parallel executions.
The node on which the pipeline and the jobs run is a single node having number of executer
set to 10.
Everything works fine when I run 10 parallel concurrent pipeline.
But if I run more than 10 parallel pipelines then all of them seem to go in a deadlock, none of them completes no matter how long you wait and send they are waiting on each other to complete.
If I kill the 11th execution then all the 10 start completing successfully.
My requirement is that if someone executes more concurrent builds of a pipeline than the number of executors it has for the node that it runs on; then in that case 10 should complete parallel execution and 11 onwards should wait until then and should be executed in the second batch of 10 executions rather than all going to a hung state.
Please help me understand if this is a bug with Jenkins latest version and what is the workaround to avoid all pipeline builds from falling in hung state?