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:

(info) Note that the value of an agent-specific capability overrides the value of a shared capability of the same name (if one exists).

On this page:

 

Defining an agent-specific custom capability

To define a new agent-specific custom capability:

  1. Navigate to the desired agent, as described in Viewing a Bamboo agent's details.
  2. Click Add Capability in the top right of the 'Agent-Specific Capabilities' section.
  3. Choose Capability Type > Custom.
  4. Specify values for Key and Value.
  5. 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:

  1. Click the  icon and select Bamboo admin.
  2. Click Server Capabilities in the left navigation panel (under 'Build Resources').
  3. Locate the 'Add Capability' section at the bottom of the screen (see screenshot below).
  4. Choose Capability Type > Custom.
  5. Specify values for Key and Value.
  6. 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:

  1. Click the  icon and select Bamboo admin.
  2. Click Agents in the left navigation panel (under 'Build Resources').
  3. Locate the 'Remote Agents' section.
  4. Click Shared Remote Capabilities.
  5. Locate the 'Add Capability' section at the bottom of the screen (see screenshot below).
  6. Choose Capability Type > Custom.
  7. Specify values for Key and Value.
  8. Click Add.

2 Comments

  1. Robert Fleming

    Is there a way to install a new remote agent on a server and define Agent-Specific Capabilities without having to edit in Bamboo itself?  I would like to define Agent-Specific Capabilities that are associated with the remote server itself, and add requirements for certain jobs so they are only run on specified servers with that Agent-Specific Capability.  They are virtual machines that are constantly rebuilt as needed, so I am running the installer as these new instances are created when the machine comes online.  Currently, it just increments the name of the remote agent with (1) at the end of the name (or 2, 3, 4, etc.  However many times the server has been recreated).

    1. ArmenA

      Hi Robert,

      You can set the remote agent capabilities using the technique described on this page - Configuring remote agent capabilities using bamboo-capabilities.properties. Also, every time you start a new remote agent, Bamboo will assign a new ID to it, so if you want Bamboo to recognize the new agent and treat it like the old one, you can copy the details of the previous agent from the AgentHome/bamboo-agent.cfg.xml file.

      Armen