Azure devops - build number vs build id
May 11
Documentation says:
Build.BuildId - The ID of the record for the completed build.
Build.BuildNumber - The name of the completed build, also known as the run number and that it can be customized.
If you create a fresh build pipeline and do not customize BuildNumber format:
it will be given a unique integer as its name
In this case, is BuildNumber and BuildId exactly the same?
1 answer
Accepted answer · original discussion
Aug 27
No, it's not necessarily the same. I just checked my classic and yml pipelines.
For classic, both BuildId and BuildNumber are integers and are the same if not customized.
For yml, BuildId is an integer and BuildNumber consists of the current date and number of tries per day. As per documentation, the format is $(Date:yyyyMMdd).$(Rev:r).
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.