TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Build Numbering

Last modified: 20 April 2023

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:

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.