Requirement
data class Requirement(val type: RequirementType, val param: String, val value: String? = null, val id: String? = null)
An agent requirement, use methods in Requirements class to create it
Example. Requirements for different agent OSes
buildType {
// ...
requirements {
contains("teamcity.agent.jvm.os.name", "Windows")
}
}
Content copied to clipboard
requirements {
contains("teamcity.agent.jvm.os.name", "Linux")
}
Content copied to clipboard
requirements {
contains("teamcity.agent.jvm.os.name", "Mac OS X")
}
Content copied to clipboard
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")
}
Content copied to clipboard
Example. Requirement for an agent with a specific parameter in its buildAgent.properties
file
requirements {
exists("my.custom.parameter")
}
Content copied to clipboard
Parameters
type
requirement type
param
parameter name
value
value to check, might be null if requirement doesn't need a value
id
optional requirement id, if not specified will be generated