Defining Properties
The user-defined properties can originate from several scopes:
Build-Configuration-Properties - the properties defined on 6.Properties and environment variables settings page of a build configuration.
in a teamcityDefaultProperties file in the VCS
Custom Build Properties - the properties specified in Run Custom Build Dialog on the build run.
Agent-Properties - the properties specified in the agent's
<Agent home>/conf/buildAgent.properties
file.
The system properties and environment variables required for a build configuration can be defined in three locations. Where these properties and variables are set will determine whether they affect a specific build configuration, all of a project's build configurations that use the same VCS root, or a specific Build Agent.
To define properties specific to a build configuration, enter them on the Build Configuration's 6.Properties and environment variables page.
To define properties for all of a project's build configurations that use the same VCS root, create a text file named
teamcity.default.properties
, and check it into the VCS root. Ensure the file appears directly in the build working directory by specifying appropriate Configuring VCS Settings. The name and path to the file can be customized via theteamcity.default.properties
property of a build configuration. Properties defined this way will not be visible in the TeamCity web UI, but will be passed directly to the build process.To define agent-specific properties edit the Build Agent's
buildAgent.properties
file (<agent home>/conf/buildAgent.properties
). Refer to the Predefined Properties page for more information.
The precedence of the properties is described in Using Properties section.
The system properties and environment variables are defined in the teamcity.default.properties
and buildAgent.properties
files using the following format:
[env|system].<property_name>=<property_value>
For example: env.CATALINA_HOME=C:\tomcat_6.0.13
env. properties define the environment variables used during the process of running the build. These consist of the environment variables of the agent running the build, the environment variables defined in the agent configuration and the TeamCity default properties files and the environment variables set for the build configuration on the 6.Properties and environment variables page when you Creating and Editing Build Configurations. Please note that the agent's environment variables can vary depending upon which user the agent process is running. The list of environment variables available on a specific build agent can be found on the Environment variables tab of the Agent Details page .
system. properties include the properties defined on the 6.Properties and environment variables page in build configuration area of TeamCity, agent-specific predefined properties as well as system properties defined in the agent configuration file.