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 |
---|---|
{ | 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. |
{ | the revision used for the build of the VCS root with |
| 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.