Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"stick" jobs to the master

Tags:

jenkins

I'm running jenkins 1.455. I have a master and a few slaves. I use labels on the builds and have the slaves set to "leave this machine for tied jobs only", everything works fine. However, I would like to do the inverse and set the slaves to "utilize this slave as much as possible and have only a couple of builds on the master. Can I use "master" as a label in the "Restrict where this project can be run" field?

like image 869
cdog Avatar asked Mar 23 '12 14:03

cdog


1 Answers

Tell Jenkins to run a specific job only on the master node by configuring that job to restrict where this project can be run and setting the label to master.

Open the configuration panel for your job, under the General section: set jenkins node label expression to master

Set the label to !master to restrict the job to run only on slave nodes.

like image 166
Shorn Avatar answered Sep 18 '22 12:09

Shorn