March 30, 2013

Jenkins - Running a common task on Multiple Agents

Sometimes we may want to run similar set of tasks on a list of computers. Jenkins Multi-Configuration Projects will help you to achive this.

Assume a scenario where you wanted to configure.bat on the computers PC1A, PC2A, PC3A and PC4A.

Steps:
  1. Jenkins - New Job ->Enter a name "ConfigureAll", Select "Build multi-configuration project" radio button and click "OK"
  2. Go to Configuration Matrix in ConfigureAll job, Select Slaves drop down from "Add Axis" drop down
  3. Node/Label filed will list all the nodes that are added to the Jenkis Server.
  4. Select the nodes PC1A, PC2A, PC3A and PC4A.
  5. Add a Build Step to "Execute Windows batch command" and enter <path>\configure.bat.
With this approach, you can have one job to perform a common action on n slave agents.

No comments:

Post a Comment