Customize starting CIRCLE_BUILD_NUM
S
Sam Blackburn [[Unknown]]
Could we have some sort of resettable build counter please? Doesn't have to actually be the pipeline ID.
Most of our builds create .NET assemblies which have 4-part versions. Version ordering is important so that customers and dependent codebases will upgrade to the latest version rather than accidentally downgrading.
We’d like our build counter to be higher than our existing build server so that we can switch over without needing to wrap around (which breaks ordering) or bump more significant parts of the version (which we use to represent API changes).
Another concern is that .NET uses 16-bit shorts for the versions, and a few of our pipeline IDs are expected to exceed the max value sooner or later.
TeamCity exposes a “build counter” which increments each time a build is run, but it’s separate from the internal build ID so it can be reset by a user without affecting other aspects of the build. This would be a very convenient feature to have in CircleCI.