TeamCity 3.0 Help

Build Numbering

Each build in TeamCity is assigned a build number. This number is shown in the UI and it can be referenced from various places. You can also get access to the build number in your build, using either the build.number system property or the BUILD_NUMBER environment variable. You can specify how build numbers are composed on the 1.General Settings page for each build configuration. The primary setting for this is the "Build number format", an arbitrary string that can reference either the build counter or the VCS changeset number.

To reference the build counter, enter {0} - the build counter will increase the number with each build (this can be edited in "Build Counter" setting). To reference the VCS changeset number, enter {build.vcs.number.1} - this will be replaced with the actual changeset number from the VCS. As long as TeamCity supports several VCS for each project, there could be {build.vcs.number.2} and more, depending on number of VCSs used.

Last modified: 20 April 2023