Custom capabilities can be used to control which jobs will be built by a particular agent, since agent capabilities are required to match job requirements. 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.(See Configuring a job's requirements.)
You can define a custom capability that is:
Note that the value of an agent-specific capability overrides the value of a shared capability of the same name (if one exists).
Defining an agent-specific custom capability
To define a new agent-specific custom capability:
- Navigate to the desired agent, as described in Viewing a Bamboo agent's details.
- Click Add Capability in the top right of the 'Agent-Specific Capabilities' section.
- Choose Capability Type > Custom.
- Specify values for Key and Value.
- Click Add.
Defining a local server custom capability
Local server capabilities are inherited by all local agents.
To define a new local server custom capability:
Click the
icon and select
Overview.
- Click Server Capabilities in the left navigation panel (under 'Build Resources').
- Locate the 'Add Capability' section at the bottom of the screen (see screenshot below).
- Choose Capability Type > Custom.
- Specify values for Key and Value.
- Click Add.
Defining a shared remote custom capability
Shared remote custom capabilities are not shared with elastic agents.
To define a new shared remote custom capability:
Click the
icon and select
Overview.
- Click Agents in the left navigation panel (under 'Build Resources').
- Locate the 'Remote Agents' section.
- Click Shared Remote Capabilities.
- Locate the 'Add Capability' section at the bottom of the screen (see screenshot below).
- Choose Capability Type > Custom.
- Specify values for Key and Value.
- Click Add.