Selecting executors in Jenkins?

6k Views Asked by At

In my company we're using a single Jenkins build server. We have resource-heavy interdependent build jobs as well as smaller ones, equally important. During peak times, the big builds tend to block the pipeline.

My question: is it somehow possible to select a single executor (not a node) and assign certain jobs to it so it will always be free for the lightweight ones?

I know I could set up slave nodes, even on the same machine, and that it's very common and much supported by Jenkins. Our server could handle a vm running as a slave, but before I go to the trouble I want to know if there's a shorter way.

Cheers

2

There are 2 best solutions below

2
On BEST ANSWER

As you mentioned setting up a slave node is the right way to go.

That said if you're limited on resources you could perhaps run the slave client on the same server as which you are running Jenkins?

The comments on this ticket suggest that this should work: https://issues.jenkins-ci.org/browse/JENKINS-4850

1
On

In a setup where there is no Jenkins master-slave configuration, you do have settings to restrict # of executors. Just go to Jenkins > Manage Jenkins > Configure System

On this page, you will find the option # of executors

There is a plugin as well which might be of use if the above suggestion doesn't meet your requirement: https://wiki.jenkins-ci.org/display/JENKINS/Throttle+Concurrent+Builds+Plugin