You are viewing the documentation of TeamCity 9.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.x documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

Skip to end of metadata
Go to start of metadata

By specifying Agent Requirements for build configuration you can control on which agents the configuration will be run.

To add a requirement, click corresponding link and specify the following options:

Parameter Type

Specify the type of the parameter: system property, environment variable, or configuration parameter. For details on the types of parameters available in TeamCity, please refer to Configuring Build Parameters section.

Parameter Name

Specify the mandatory property or environment variable name.


Select condition from the drop-down list.

Some notes on how conditions work:


  • equals: This condition will be true if an empty value is specified and the specified property exists and its value is an empty string; or if a value is specified and the property exists with the specified value.
  • does not equal: This condition is true if an empty value is specified and the property exists and its value is NOT empty; or if a specific value is specified and either the property doesn't exist, or the property exists and its value does not equal the specified value.
  • does not contain: This condition will be true if the specified property either does not exist or exists and does not contain the specified string.
  • is more than, is not more than, is less than, is not less than: These conditions only work with numbers.
  • matches, does not match: This condition will be true if the specified property matches/does not match the specified Regular Expression pattern.
  • version is more than, version is not more than, version is less than, version is not less than: compares versions of a software. Multiple formats are supported including "."-delimited, leading zeroes, common suffixes like "beta", "EAP". If the version number contains alphabetic characters, they are compared as well, for instance, 1.1e < 1.1g.


Is shown for some conditions that require value, for example: equals

Note that the Agent Requirements page also displays the list of compatible and incompatible build agents for this build configuration, which is updated each time you modify the list of requirements. Possible reasons why build agent may be incompatible with this build configuration are described separately.

See also:

  • No labels


  1. Some additional details on "version is more than" condition.

  2. Is it possible to parameterize the agent requirements based on project or build configuration parameters? E.g. can value include %...% substitutions?

    An example: we have a project parameters env.XXX_VERSION which specifies the needed version of the XXX product in all the build configurations of the project. We can then use this value in the relevant build scripts of the project. (Over time we make copies of this build project for different variants of some of the products we depend on, so we now have 12 different projects with different values for the parameters). Now I also would like to include an agent requirement from all the relevant build configurations in the project so only the usable agents will be considered. But given the number of build configurations and the number of variant projects, I would prefer to parameterize the requirement on the value of the exiting env.XXX_VERSION.

    Is this possible?

    (Today, all our agents includes all possible versions of the software, but will no longer be possible, so we will need requirements on the agents from the projects of build configurations)