TeamCity 4.0 Help

Build Numbering

Each build in TeamCity is assigned a build number. This number is displayed in the UI and passed into the build as a Predefined Properties.

You can specify a pattern to compose a build number on the 1.General Settings page of Build Configuration settings in the Build number format field.

The build number format is a pattern that is resolved and assigned to the build number on the build start.

The following substitutions are supported in the pattern:

Pattern

Description

{0}

a build counter unique for each build configuration. It is maintained by TeamCity and will resolve to a next integer value on each new build start. The current value of the counter can be edited in the 1.General Settings field.

{build.vcs.number.<VCS_root_name>}

the revision used for the build of the VCS root with <VCS_root_name> name. Predefined Properties on the property.

%\property.name%

a value of the build property with corresponding name. All the Predefined Properties are supported (including Predefined Properties).

Though not required, it is still highly recommended to ensure the build numbers are unique. Please include build counter in the build number and do not reset the build counter to lesser values.

It is also possible to change the build number from within your build script. For details please refer to the Build Script Interaction with TeamCity.

Last modified: 20 April 2023