Requirements
Collection of agent requirements in build configuration or template.
Example. Requirements for different agent OSes
buildType {
// ...
requirements {
contains("teamcity.agent.jvm.os.name", "Windows")
}
}
requirements {
contains("teamcity.agent.jvm.os.name", "Linux")
}
requirements {
contains("teamcity.agent.jvm.os.name", "Mac OS X")
}
Example. Requirement for an agent with a running Docker server on Linux OS
requirements {
exists("docker.server.version")
contains("teamcity.agent.jvm.os.name", "Linux")
}
Example. Requirement for an agent with a specific parameter in its buildAgent.properties
file
requirements {
exists("my.custom.parameter")
}
See also requirements().
Inheritors
Functions
Copies the receiver requirements
Copies the receiver requirements to the specified target
Adds a requirement that the value of the specified parameter does not contain the given value
Adds a requirement that the value of the specified parameter is not equal to the given value
Adds a requirement that the parameter with the specified name does not exist on the agent
Adds a requirement that the value of the specified parameter does not match the given value
Adds a requirement that the value of the specified parameter is less than the given value as a version
Adds a requirement that the value of the specified parameter is greater than the given value as a version
Adds a requirement that the value of the specified parameter is not less than the given value
Adds a requirement that the value of the specified parameter is not less than the given value as a version
Adds a requirement that the value of the specified parameter is not greater than the given value
Adds a requirement that the value of the specified parameter is not greater than the given value as a version
Adds the specified requirement
Adds a requirement that the value of the specified parameter starts with the given value