|You are viewing documentation of TeamCity 4.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.|
The properties of a Build Configuration can be used:
The properties fall into two categories:
The properties are passed to the build as environment variables and as system properties of the build script.
Any runner gets the environment variables that are a combined set of:
env. prefix is trimmed from the properties before passing them into environment.
Scripts run with Ant, NAnt, MSBuild runners get properties from a combined set of:
system. prefix is trimmed from the properties before passing them into the build script.
Any system property (system.<property name>) can be referenced in a build script by the property name:
Many settings of a build configuration allow to use a reference to the Build Configuration properties. Before being passed into a build, all the references will be resolved with the available properties. If there will be references that cannot be resolved, they will be left as is and a warning will be logged into the build log.
The properties should be referenced as system.<property_name> for system properties and env.<variable_name> for environment variable.
Values of the following settings support references:
The references are made by enclosing the full property name including env./system. prefixes into percentage signs.
Any property that is referenced in a build configuration, but is not defined, becomes an agent requirement for the configuration. The build configuration will be run only on agents that have this property defined.
In Build number pattern and VCS labeling pattern you can use %[env|system].property_name% syntax to reference the properties that are known on the server-side. These are server and reference predefined properties and properties defined in the settings of the build configuration on Properties and environment variables page.