Jenkins - Increase number of executors for one job only

15,112

Solution 1

You need a Build Blocker plugin. It will allow you to specify, per job, when the job should not run.

It does that with regular expressions. If jobs follow a common naming convention, you could use wildcards. Else, just list every job (that you don't want executing together) on separate lines.

There are many similar plugins, like
- Locks and Latches
- Heavy Job
- Exclusions plugin

Another way is to configure a slave node, let is run on the same machine as the master, give that slave node 3 executors and configure it to run only "tied" jobs. Then, on your special job, tie it to run on that slave only.

Solution 2

You can increase the number of executors per job from this plugin

https://wiki.jenkins-ci.org/display/JENKINS/Heavy+Job+Plugin

Share:
15,112

Related videos on Youtube

elmekiesIsrael
Author by

elmekiesIsrael

Updated on September 16, 2022

Comments

  • elmekiesIsrael
    elmekiesIsrael about 1 year

    I have a Jenkins machine with a lot of jobs running on it. To this Jenkins, I attached 3 slave nodes.

    Now, I only have one executor in the Jenkins because I don't wish to run multiple jobs simultaneously since that can cause the jobs to fail.

    BUT, I want to create just one job, that runs 3 sub-jobs simultaneously, one on every node. I don't mind that those jobs run together, as long as any other job wont run with them as well.

    If I increase the number of executors, Then other jobs that are scheduled to run at that time may enter the queue will start running. Not good for me.

    Is there a plug-in that can help my situation or any other workaround to this matter?

    Thanks!