Issue: build vcs number is not consistent with the changelist submitted on a new build type


I am running into a problem when a new Kotlin change is submitted in perforce.
When our build flow starts a new build type it's build number does not correlate with the change submitted.

For example, all the old build types in our build flow will use CL1234, but the new build type will use CL1235. It increments for some reason.
We reference our build number pattern for build types in our Kotlin script like this: CL%build.vcs.number%.

It only occurs on the first addition of a new build type, then it starts functioning.
Does anyone have an idea why this can happen?


1 comment
Comment actions Permalink

Hi Eric,


could you check for those builds on the build results under the Build Parameters tab whether the build.vcs.number contains the actual value? Could you also check the changes tab to see what revisions are being reported there? This value is typically picked up from the changes that have been picked up by the build. TeamCity should not even assume this is a number since this is abstracted away from the specific VCS type and many of them don't use numeric values.


Can you check whether the changes reported by the build include the 1235 and the 1234 (following your example)? In this case it might be that simply both changes have been picked up at the same time and it's reporting the first one.


Please sign in to leave a comment.