8
votes

I only managed to get TeamCity trigger builds for new changes in branches, but not when a branch or tag is created. I'd like to automatically trigger a build when I create a version tag.

1
@Vadzim Doesn't seem to be a duplicate, the question here was about triggering builds on tag creation, not commits.pronvit

1 Answers

3
votes

@stevechapman, thanks

Sorry, I understood this question wrong. If you want to run a build as soon as your tag is created, teamcity currently does not have a feature that runs out of the box. You can:

  1. Configure a git post commit hook that runs a build target after you create your tag
  2. Or you can have a custom teamcity target that scans git repo for newly created tags and run if you find any.
  3. In case you are creating the tag in a build target in teamcity, you can create a dependent target that will run after your original target and work on the tag that you just created.