This page describes how to configure the capability requirements for a Job.
A requirement is specified in a Job and defines the capabilities which are required by an agent to build that Job.
Together, capabilities and requirements control which agents can execute builds for particular Jobs. Each Job can only be built by agents whose capabilities meet the Job's requirements.
There are four types of capabilities in Bamboo:
- Builder capability — Every Job has one 'Builder' capability requirement.
- JDK capability — A Job has either one 'JDK' capability requirement or none, depending on the Job's 'Builder'.
- Custom capability — A Job can have multiple 'custom' capability requirements (or none). Before you can specify a custom capability in your Job, you must first define the custom capabilities in your Bamboo system (see Configuring a new Custom 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 '
operating.system=WindowsXP' for the appropriate agent(s), and specify it as a requirement for this Job.
- Perforce capability — A Job will have a 'Perforce' capability requirement automatically specified, if Perforce was selected as the source repository.

Screenshot above: Editing a Job's Requirements
Specifying a Job's Requirement for a Builder
To specify a Job's requirement for a Builder capability:
Choose a value for the 'Builder' field on the Job's 'Builder' tab. Please see Specifying a Builder for instructions.
Specifying a Job's Requirement for a JDK
To specify a Job's requirement for a JDK capability:
Choose a value for the 'Build JDK' field on the Job's 'Builder' tab. Please see Specifying a Builder for instructions.
Specifying a Job's Requirement for a Custom Capability
To specify a Job's requirement for a custom capability:
- Navigate to the desired Job's configuration pages, as described on Editing a Job.
- Click the 'Requirements' tab to display the Job's Requirements settings (see screenshot above). This page shows a list of all the Job's current requirements and a list of Capable Agents (i.e. agents which meet the Job's requirements and are therefore capable of running a build for this Job). See Viewing Current Capable Agents below for more information.
- If you had previously set up a custom requirement (e.g. for another Project or Plan), you can select it from the 'Requirement' dropdown in the 'Add Extra Requirement' section and continue from step 6. If you are setting up a new custom requirement, select 'New custom requirement' instead and complete the following steps.
- In the 'Key' field, type the key of the capability that this Job must require.
- In the dropdown box below the 'Key' field, select one of the following:
- 'exists' — this Job can be built by any agent that has a custom capability with the same Key as the one you have just specified.
- 'equals' — this will display a text field for you to enter an exact value. This Job can be built by any agent that has a custom capability with the same Key and value.
- 'matches' — this will display a text field for you to enter a regular expression (for more information about regular expressions, please visit http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html#sum). This Job can be built by any agent that has a custom capability with the same Key as the one you have just specified, where the value matches this regular expression.
- Click the 'Add' button to add your new custom capability to the Job's list of requirements.
The list of 'Capable Agents' displayed will be updated, as the plan can now only be built by agents which have a custom capability that meets the new custom requirement you have specified.
Click the 'Save' button to save your changes.
Configuring a Job's Build Artifacts
The 'Requirements' tab (see screenshot above) shows all of a Job's requirements: Builder, JDK and custom capabilities. It also shows which agents meet the requirements (i.e. are capable of building the Job). To see what capabilities a particular agent has, see Viewing an Agent's Capabilities.
Viewing Current Capable Agents
From a Job's Requirements page (above), you can view which agents are currently capable of building the Job.
To view details about (conventional) agents that are currently capable of building your Job:
- From the Job's Requirements page (steps 1 and 2 above), move your mouse pointer over the highlighted text 'X agent(s)', where X is the total number of agents capable of building the current Job. A popup listing the first five agents and a 'More' link is displayed.
- You can do either of the following in this popup:
- Click one of the listed agents to show further information about that agent:
- Recent Builds — the recent builds that used this agent,
- Executable Plans — all Jobs whose requirements match the capabilities of this agent, and
- Capabilities — the capabilities of the agent itself.
- Click the 'More' link to show the full list of agents that are capable of building this Job.
- You can then click one of the agents in this list to show further information about that agent (as described above in the previous point).
To view details about elastic agents that are currently capable of building your Job:
- From the Job's Requirements page (steps 1 and 2 above), move your mouse pointer over the highlighted text 'X image(s)', where X is the total number of Elastic Cloud images available to the current Job. A popup listing these Elastic Cloud images is displayed.
If you are a Bamboo Administrator, the popup list of Elastic Cloud images will be hyperlinked to their respective elastic image configuration pages. For more information about these pages, please refer to Viewing an Elastic Image.
注意
Editing a Job
Specifying a Builder
Viewing an Agent's Capabilities