The user-defined properties can originate from several scopes:
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 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 checkout rules. The name and path to the file can be customized via the teamcity.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 Agent-Specific Properties page for more information.
 |
- Note that properties and variables entered on the build configuration's page take priority and will supersede the values entered in the teamcity.default.properties and buildAgent.properties files. Likewise values set in the buildAgent.properties file will supersede values set in the teamcity.default.properties.
- Default build properties loaded from teamcity.default.properties are logged into the agent's log, but not to the build log.
|
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 Properties and environment variables page when you create or edit a build configuration. 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 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.
See Also