Build Parameters such as configuration parameters, system properties and environment variables, provide you with flexible means of sharing settings within a single Build Configuration, managing compatible agents based on specific environment (see Configuring Agent Requirements) and a convenient way of passing generic or environment-specific settings into the build script. In this section:
Configuration parameters provide a way to override some settings in a build configuration inherited from a template. They are never passed to a build.
To introduce a configuration parameter use %ParameterName% syntax in the template text fields thus providing means to change actual values of such parameters in associated build configuration. Once introduced, such parameter appears on the Build Parameters page of the build configuration template with undefined value.
You can either specify parameter's default value or leave it without any value.
Assume that you have two similar build configurations that differ only by checkout rules. For instance, checkout rules for the first configuration should contain '+:release_1_0 => .', and for the second '+:trunk => .'. All other settings are equal. It would be useful to have one template to associate with both build configurations, but with means to change checkout rules in each build configuration separately.
To do so, perform the following steps:
As a result, you'll have two build configurations with different checkout rules, but associated with one template.
This way you can create a configuration parameter and then reference it from any build configuration, which has a text field.
System properties and environment variables provide you with a flexible means of sharing settings within a single Build Configuration, managing compatible agents based on specific environment (see Configuring Agent Requirements) and a convenient way of passing generic or environment-specific settings into the build script.
There are several places where you can define system properties and environment variables:
When TeamCity starts a build process the following set of environment variables is used:
System properties passed to the script engine include:
For details on defining and using parameters, refer to: Defining and Using Build Parameters in Build Configuration, Project and Agent Level Build Parameters.
Skip to end of metadata Go to start of metadata