Different TeamCity build counters for a git branch

We use gitflow and TeamCity to develop many of our products. We also need to support multiple releases at the same time and work on the next release.

We use support branches for previous releases, and also develop and master our current and future versions, which are pretty standard in my opinion.

Is there an easy way to set a build counter in TeamCity for each branch without having to check it out on the repo or have different configurations for each version?

For example, I want my version to be on the same support branch, I want 1.0.1 (counting builds for version 1), when developing / master, I want 2.0.0 (counting builds for version 2).

I know I can check the version at the end of the build, but hoped it would be better, we are not checking anything at the moment.

+3


source to share


1 answer


No, not that I know. Currently (as of TC 9.0) each branch uses the same build configuration. The only way I know to do what you ask is to create a template (so all build steps will use the same template to avoid duplication) and then create multiple build configurations, each associated with a specific VCS branch ...



+1


source







All Articles