You are viewing the documentation of TeamCity 8.x, which is not the most recently released version of TeamCity.
Go to the latest TeamCity documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

Skip to end of metadata
Go to start of metadata

Build Parameters provide you with flexible means of sharing settings and a convenient way of passing settings into the build.

Build parameters are name-value pairs, defined by a user or provided by TeamCity, which can be used in a build.

There are three types of build parameters:

  • Environment variables (defined using "env." prefix) are passed into the spawned build process as environment
  • System properties (defined using "system." prefix) are passed into the build scripts of the supported runners (e.g. Ant, MSBuild) as build-tool specific variables
  • Configuration parameters (no prefix) are not passed into the build and are only meant to share settings within a build configuration. They are the primary means for customizing a build configuration which is based on a template or uses a meta-runner .

There is a set of predefined parameters provided by TeamCity and administrators can also add custom parameters.

The parameters can be defined at different levels (in order of precedence):

  • in a specific build (via Run Custom Build dialog)
  • Build Configuration settings (the Build Parameters page of Build Configuration settings) or Build Configuration Template
  • Project settings (the Parameters page of the Project settings). These affect all the Build Configurations and Templates found in the project and its subprojects.
  • Agent (<Agent home>/conf/buildAgent.properties file on agent)

Any textual setting can reference a parameter which makes the string in the format of %parameter.name% be substituted with the actual value at the time of build.
If there is a reference to a parameter which is not defined, it is considered an implicit agent requirement so the build will only run on the agents with the parameter defined.

See more in the corresponding sections: Defining and Using Build Parameters in Build Configuration and Project and Agent Level Build Parameters.

See also:

  • No labels