requirements

fun requirements(init: Requirements.() -> Unit)

Configures agent requirements

Example. Requirements for different agent OSes

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")
}

Parameters

init

function to initialize requirements