Run a Job on a group of Agents
Sometimes there is a particular job that you may wish to run on all agents in an environment, or in all agents that match a certain resource tag. For example you may want to run a system update on all linux agents, or install a new piece of software.
GoCD will run the Job on all agents that match the environment and resources specified in the job.
If an agent is missing or lost contact, a job will be scheduled. When the agent comes back on line, the job will be re-scheduled.
Jobs are given a unique name based on the name of the job in the configuration file. So for example, if the job is called βdeployβ and you have two agents, you would see jobs like βdeploy-runOnAll-1β and βdeploy-runOnAll-2β.
Configure through the Admin UI
To enable run on all agents for a job, navigate to the Job settings page in the job configuration

Configure through the Config XML
To specify that a job should run on all agents, add the attribute runOnAllAgents="true"
to the jobβs definition (see configuration reference for <job>)
<job name="deploy" runOnAllAgents="true">
...
</job>
Run βXβ instances of a Job
If you want to run multiple instances of the same job configuration you do not have to maintain multiple copies of same job config. You can specify how many instances of job you need & Go will take care of spawing the required number of job instances during scheduling.
This feature is particularly useful for test parallelization. It enables Go users to integrate with other test parallelization tools like TLB etc. to achieve distributed test execution with minimal configuration.
Jobs are given a unique name based on the name of the job in the configuration file. Example, if the job is called βtestβ and you have set runInstanceCount to 2, you would see jobs like βtest-runInstance-1β and βtest-runInstance-2β. Go provides index of job (GO_JOB_RUN_INDEX) & total count of jobs (GO_JOB_RUN_COUNT) as environment variables to each Job.
Configure through the Admin UI
To run βxβ instances of a job, navigate to the Job settings page in the job configuration

Configure through the Config XML
To specify that βxβ instances of a job should run, add the attribute runInstanceCount="5"
to the jobβs definition (see configuration reference for <job>)
<job name="test" runInstanceCount="5">
...
</job>