Search code examples
gittagsteamcity

TeamCity: choose specific commit based on selected tag


I have a git repository where released versions (e.g. "3.0.1") are marked as tags. I need to add a parameter for TeamCity task (ideally with dropdown list) where I can choose specific tag — and the task should build this specific commit.

Is it even possible?


Solution

  • This is not how TeamCity is designed to work.

    Tags (as well as branches) are retrieved from the VCS root attached to the build configuration. In the UI it will look like a list of branches for this build configuration, where each branch/tag could be triggered separately with its own history, build chains, and other features.

    To make it work, you need to enable Use tags as branches option and add the required tag expressions to the branch filter.