Configuring Agent Requirements

Edit page Last modified: 01 February 2024

Agent Requirements are conditions that specify which agents can run your build configuration. Any agent requirement is the parameter operator [value] expression, where:

  • parameter is either a predefined or a custom (user-defined) build parameter. For example, the teamcity.agent.jvm.os.name parameter that reports which operating system is installed on the agent. Note that since requirements should identify whether an agent can run builds for this specific build configuration, you should only use parameters whose values can differ depending on the agent. For example, the teamcity.serverUrl parameter reports the same value for any agent and is useless for defining agent requirements.

  • operator is a keyword that defines how to treat the value part. You can choose between "equals", "starts with", "is not more than", and other operators. See this article for the complete list: Requirement Conditions.

  • value is compared with the actual value reported by the parameter. If it fits the specified criteria, the entire expression returns true, which means this agent is compatible with (can run builds of) this specific configuration. Certain operators do not require values, for example the exists operator checks whether the parameter value is not null. The matches and does not match operators allow you to use regular expressions for comparing values.