Jenkins to not allow the same job to run concurrently on the same node?
- by Marek Gimza
I have 4 nodes and 2 jobs. Any node can run 2 jobs concurrently and any job can be executed concurrently. I want to be able to restrict running the same job concurrently on the same machine. For example:
Jobs: J1 and J2
nodes: N1,N2,N3 and N4
I can run J1 and J2 on the same node at the same time.
I can run J1 on N1 and N3 at the same time.
BUT I do not want to run J1 and another build of J1 on the same node at the same time.
I have tried "Locks and Latches", "Jenkins Exclusive Execution", "Exclusion Plugin" plugins, and these will work well when trying to coordinate different jobs. But my case is trying to manage different build-instances of the same job.