Search code examples
jenkins-pipeline

How can I run concurrent builds of the same job, but on different build nodes?


I want to support concurrent builds on a job, but I want the builds to happen on two different build nodes. Is there a good way to support this? I know I can hack something but is there a built-in support for it?

NOTE: My build nodes have 4 executors on them, so I still want to be able to run different jobs on the node, just not the same job on the same node concurrently.


Solution

  • I did something smart, I labeled my nodes differently so one run uses one label and another concurrent run uses another label. This is the simplest idea to implement.

    Another idea was to use different workspaces. However, the concurrent jobs could still end up on the same node which can lead to performance issues.