This page describes how to configure the requirements of a job.A requirement is specified in a job or a task. A requirement specifies a capability that an agent must have for it to build that job or task. A job inherits all of the requirements specified in its tasks.
Together, capabilities and requirements control which agents can execute builds for particular jobs. Each job can only be built by agents whose capabilities match the job's requirements.
There are four types of capabilities in Bamboo that can be specified by job and task requirements:
- Executable capabilities — Define external programs that can be called by Bamboo, for example Ant, Maven, MSBuild or PHPUnit. See Defining a new executable capability.
- JDK capabilities — Define the JDK versions to be used by the job or task. See Defining a new JDK capability.
- Version control capabilities — Specify the VCS client application that Bamboo should use to check out source code. See Defining a new version control capability.
- Custom capabilities — Can be used to control which jobs will be built by a particular agent. For example, if the builds for a particular job should only run in a Windows environment, you could create a custom capability of '
operating.system=WindowsXP' for the appropriate agent(s), and specify it as a requirement for this job. See Defining a new custom capability.
Before you can specify a requirement in your job, you must first define that capability in your Bamboo system.
Specifying extra requirements for a job
A job will inherit the requirements of its tasks by default. However, you can specify extra requirements for a job, in addition to its task requirements.
To specify extra requirements for a job:
- Navigate to the desired job's configuration pages, as described on Configuring jobs.
- Select the Requirements tab (see screenshot below). This page shows a list of all the job's current requirements and the number of Agents and Images (i.e. agents/elastic images which meet the job's requirements and can run a build for this job). See Viewing current capable agents below for more information.
- Search for a capability and select a requirement from the list.
- Select the value for the requirement from the list:
- exists — this job can be built by any agent that has a capability with the same key.
- equals — this job can be built by any agent that has the capability with the same key and value.
- matches — this job can be built by any agent that has a capability with the same key, and the value matches the regular expression. For more information about regular expressions, see Oracle's tutorial on regular expressions.
- Select Add. The numbers of Agents and Images will be updated, as the plan can now only be built by agents with capabilities that meet the new custom requirement you have specified.
Viewing current capable agents
To view details about agents or elastic images that are currently able to build your job: