0
votes

Currently have multiple pipelines (A, B, C) on Jenkins with nodes (X, Y, Z). We enabled the Throttle Concurrent Builds plugin to make sure only one build from a pipeline is run on a single node.

The problem is, with this approach, builds from different pipelines can collide (for example, pipeline A could already be executing on node X, and we don't want any other pipelines executing on node X until pipeline A is done). The TCB plugin makes sure that multiple builds from a single pipeline doesn't run on one node, but it doesn't prevent multiple pipelines spawning one build on a single node.

How do I configure Jenkins so that nodes can only run one build, NOT per pipeline?

1
Configure only one executor per node so that only one build can execute at any point of time and any others triggered wait until the current job completes execution - ben5556

1 Answers

3
votes

You can configure the Node to have just 1 executor. You can achieve this from:

Manage Jenkins -> Manage Nodes -> Select the node you want to restrict -> Set 'No of Executors to 1' -> Save.