Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CI with Jenkins: how to force building happen on slaves instead of master?

I am using Jenkins for CI, I have a master and two slaves, master is running Jenkins and I want only slaves doing the actual building task, is there anywhere I can configure this? I know there is an 'executor', if I change it to 0 on master, probably master won't build anything, but is there any proper way to do this?

like image 924
hzxu Avatar asked Dec 19 '12 06:12

hzxu


2 Answers

You can set where a job will be run using the "Restrict where this project can be run" option in your job. This setting can be used together with tags you have added to your slaves.

For example two slaves having the tag "Linux-buildserver" and using that tag will split the job up on those two slaves. Setting the IP-address as a tag in the job will make sure only that buildserver / slave is used.

like image 150
Arnestig Avatar answered Oct 23 '22 15:10

Arnestig


One of my first steps in setting up a new Jenkins master is to do what you mention in your question, set "executors" to zero in the master server config.

This prevents anything from ever building on master.

like image 30
DonBecker Avatar answered Oct 23 '22 14:10

DonBecker