Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - Increase number of executors for one job only

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!

like image 488
elmekiesIsrael Avatar asked Dec 14 '22 18:12

elmekiesIsrael


1 Answers

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.

like image 103
Slav Avatar answered Jan 12 '23 21:01

Slav