TeamCity Cloud 2021.1 Help

Project and Agent Level Build Parameters

In addition to defining build parameters in Build Configuration Settings, you can define them on the project or build agent level.

Project Level Build Parameters

TeamCity allows you to define build parameters for a project, all its subprojects, and build configurations in one place: Project Settings | Parameters tab.

Note that if a build parameter P is defined in a build configuration and a build parameter with the same name exists on the project level, the following heuristics applies:

Case 1: Project A, Build Configuration from project A.
Parameters defined in the build configuration have priority over the parameters with the same names defined on the project level.

Case 2: Project A, Template T from project A, build configuration from project A inherited from template T.
Parameters of the build configuration have priority over the parameters with the same name defined in project A, and project-level parameters have priority over parameters with the same name defined in the template.

Case 3: Project A1, Project A2, Template T from project A1, build configuration from project A2 inherited from template T.
Parameters of project A2 (the one build configuration belongs to) have priority over the parameters with the same names defined in the template.

You can also define parameters for only those build configurations of the project that use the same VCS root. To do that, create a text file named teamcity.default.properties, and check it into the VCS root. Ensure that the file appears directly in the build working directory by specifying the appropriate checkout rules. The name and path to the file can be customized via the teamcity.default.properties property of a build configuration.

The properties defined this way are not visible in the TeamCity web UI, but are passed directly to the build process.

Agent Level Build Parameters

To define agent-specific properties, edit the Build Agent's buildAgent.properties file (<agent home>/conf/buildAgent.properties). Refer to the Agent-Specific Properties page for more information.

When defining system properties and environment variables in the teamcity.default.properties or buildAgent.properties file, use the following format:

[env|system].<property_name>=<property_value>

For example, env.CATALINA_HOME=C:\tomcat_6.0.13.

Last modified: 26 February 2021