
Build ID/number
For traceability every build requires a unique ID that is easily traceable to the build host and the code used. Best practice is for this to be a single incrementing build number. Host like TeamCity do provide such a build number but some, like GitHub do not. There can also be multiple build number contexts such as dev boxes. In these cases a build ID is constructed to be a unique psuedo build number using multiple Semmantic Versioning dot delimited identifiers.
Example build ID shemas:
<build number>
- Used when the project's production build host (e.g: TeamCity) provides a build number.<build context>.<build number>
- Used for uncontrolled hosts. The build context is the host machine's name.<build number>.<build context>
- A psuedo build number (build ID) when the host's build number is not unique (e.g: GitHub worfklow).
See the build host type for details.
Note
The host's generated build number can be overriden in any build by setting the MSBuild property Git2SemVer_BuildNumber
.
See MSBuild properties.