Update build number of currently running build
I have a build step which is updating values used in my build number. My build number is in a format like 1.0.0-1, where the final 1 is the build counter and the others are environment variables, like env.major.version, etc.
This step updates them fine, in that other steps in the build use the new values, and the values are updated when I view the build config settings, but the number of that build itself isn't changed.
So for example, my latest build is 1.0.0-6. I am running a new build which updates the version to 1.0.1 and resets the build counter to 1. But this build will have a number 1.0.0-7 instead of 1.0.1-1, and only on the next build will the number use the latest values and be 1.0.1-2.
Is there a way to change the build number of the build that is currently running? I am using the rest api to set my version environment variables and set the buildNumberCounter, and then using ##teamcity[setParameter ...]## as well so that the other build steps get the latest values.
Please sign in to leave a comment.
You should be able to use ##teamcity[buildNumber '...']
Thanks! That did it.