2

I have configured jenkins env and helping us a lot. To speed up tasks (Same server is being used for Testlink),we have setup SSH Slaves (I hate to use this terms, better word would be agents or peers) ..

We would like to force Master (Jenkins server itself) to use slave nodes for building a job.

Can something like this be done?

navaltiger
  • 884
  • 12
  • 27

2 Answers2

2

I found similar question at : CI with Jenkins: how to force building happen on slaves instead of master?

Yet to close this thread, solution is

For the master: Manage Jenkins > Configure System > # of executors => Set to 0

And For the slaves (nodes), it is set in Manage Jenkins > Nodes > (each node) > Configure > # of executors

Community
  • 1
  • 1
navaltiger
  • 884
  • 12
  • 27
  • Depends.. you can also limit jobs to only run on slaves, but not on the master. How you suggest (which is totally legit), excludes all jobs from being run on the master (which is not always desired). – StephenKing May 21 '17 at 11:05
2

When You want a job to run on a particular slave, enter a label expression in the Restrict where this project can be run option like shown in the image below. Restrict to a particular slave

And enter the same label in the slave configuration like here. Note: Images are from internet so labels are different in both the images. Please make sure to use same label in both places.

StephenKing
  • 36,187
  • 11
  • 83
  • 112
sukesh
  • 171
  • 1
  • 5