Build Numbering

Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 4.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Search

Searching TeamCity 4.x Documentation

Table of Contents

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

You can specify a pattern to compose a build number on the 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 Build counter field.
{build.vcs.number.<VCS_root_name>} the revision used for the build of the VCS root with <VCS_root_name> name. Read more on the property.
%property.name% a value of the build property with corresponding name. All the Predefined Properties are supported (including Reference-only server properties).
A build number format example:
1.0.{0}.{build.vcs.number.My_Project_svn}

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 section.



See Also:

Labels:

build build Delete
number number Delete
format format Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.