In TeamCity build configuration we have access to all kinds of properties of the build via the %propertyname% syntax. For example, %env.BUILD_NUMBER%.
But one seems to be missing, and that is a property for the current build id. That is, the unique identifier assigned to every build. It's what the TeamCity REST api calls the "internal build id". Not to be confused with the BUILD_NUMBER (which is more like a label), nor the "build type id" (which is the unique id assigned to the build configuration).
This is available as %teamcity.build.id%, at least in version 6, I haven't tried earlier versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With