TeamCity Cloud 2023.09 Help

Requirement Conditions

This page explains conditions used in agent requirements or build step execution requirements.

Condition

Description

Example

exists

Returns true if the specified property exists.

DotNetCLI_Path exists

(DotNetCoreSDK7\.[\.\d]*_Path) exists

does not exist

Returns true if the specified property does not exist.

env.TEAMCITY_GIT_PATH does not exist

equals

Returns true if the specified property exists and equals the given value.

You can leave the "value" field empty to check whether the specified property exists but is empty.

docker.server.osType equals Linux

does not equal

Returns true if a value of the specified property differs from the given value, or if this property does not exist.

You can leave the "value" field empty to check whether the specified property exists and is not empty (has a value).

system.teamcity.buildType.id does not equal Tests

  • is more than

  • is not more than

  • is less than

  • is not less than

Return true if a value of the target numeric property meets the corresponding condition.

build.number is more than 256

teamcity.agent.hardware.cpuCount is less than 10

  • version is more than

  • version is not more than

  • version is less than

  • version is not less than

Compare software versions with the given value. Supports multiple value formats, including dot (.) delimiters, 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.

maven version is more than 3.0

contains

Returns true if a value of the specified property includes the given value.

teamcity.serverUrl contains localhost

does not contain

Returns true if a value of the specified property does not include the given value, or if this property does not exist.

system.agent.name does not contain _local

  • starts with

  • ends with

Returns true if a value of the specified property starts (ends) with the given value.

teamcity.agent.jvm.os.name starts with Mac

teamcity.agent.work.dir ends with /work

  • matches

  • does not match

Returns true if the specified property matches (does not match) the given regular expression pattern.

Use <custom_parameter> matches .*(,|^)foo(,|$).* to match all occurrences of foo, foo,bar, bar,foo, and bar,foo,xxx.

Last modified: 07 September 2023