Waman
Waman

Reputation: 1179

Query on triggering build remotely on mutliple conguration project

I have a job which executes on 10 platforms (slaves) but when I trigger the job and see its console output, I see a log message saying,

"Started by user <user>
Building remotely on <slave> in workspace: <path>"
Triggering slave1
Triggering slave2
Triggering slave3
Triggering slave4
Triggering slave5
.
.
.
Triggering slave10

The slave in the above messages is any one of the machines from these 10 slaves and sometimes it is any other slave which is not related to this job. How is the mechanism in Jenkins by which a slave is selected to trigger build on all target slaves?

Upvotes: 0

Views: 112

Answers (1)

Technext
Technext

Reputation: 8107

Jenkins will look for any available slave and will assign a build to run on that slave. However, if you want to restrict the build on any particular slave, then you will have to perform the following steps:

  1. Assign label to your slave nodes: To do that, go to Jenkins > Manage Jenkins > Manage Nodes > Select a Slave node > Configure. In this page, you will find a text box called Name. Assign a label/name to it. Perform this activity for all the nodes.

  2. Tie job/project to a particular node(s): Now you have to go to your job's/project's Configure section. Look for the check-box named Restrict where this project can be run. Enable it. As soon as you will enable the check-box, you will see a text box named Label Expression. Assign the name of the node where you want this particular job/project to run. This setting will tie the job to that node and the build will always run on that particular node. Don't forget to click on the '?' mark icon on the extreme left hand side of this option for more details on how you can tie your jobs/projects to multiple nodes etc.

Upvotes: 1

Related Questions