Defining a new custom capability
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:
- for a specific remote agent
- to be shared by all remote agents.
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:
- Navigate to the desired agent.
- From the Agent-specific capabilities section select Add capability.
- Select Capability type > Custom.
- Specify values for Key and Value.
- Select 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:
- From the top navigation bar select > Build resources > Agents.
- In the Remote agents section select Shared remote capabilities.
- In the Add capability section select Capability type > Custom.
- Specify values for Key and Value.
- Select Add.