3

I'm a Teamcity newbe :) But I'm very well on the way.

I know that it is possible to trigger on Tags like this: +:refs/tags/(*)

Now my question is, is it possible to trigger on special Tags with wildcard? Like this: +:refs/tags/test_*. whenever a tag for example a tag "test_101" is pushed on Git that a build will start?

Furthermore, I read that with VCS rules it is possible to trigger on VCS comments. But I can't find anything about a "comment" What is mentioned with comment?

I hope I described my request understanble because I'm not a native speaker.

Thanks in advance and cheers

kevdiablo
  • 31
  • 1
  • 2

1 Answers1

5

Once you have "+:refs/tags/(*)" in the TeamCity Git VCS root, this makes the tags display as branches in TeamCity UI.

Then you can add +:test_* in the VCS trigger branch filter to make the tags trigger a new build.

VCS trigger also provides ability to trigger only on some commits matching commit comments. Details.

Yaegor
  • 1,771
  • 9
  • 12
  • Hi Yaegor, Thanks for your Answer! I was able no to trigger with a Tag. But Only when I'm on another branch except the Master. When I add a Tag to the Master branch it is not triggered. Only when I'm on another branch it is triggered. I'd like to have it trigger by this way: devbranch -> Pull Request to Masterbranch after merging adding a Tag to the respective Masterbranch -> A now build will be triggered (When the special tag was recognized). Any Idea what I'm doing wrong? Many Thanks, much appreciate! – kevdiablo Nov 21 '17 at 13:59
  • @kevdiablo, If you have Git tags in mind which appear under refs/tags, it should make no difference what branch the tags are created for. Only revision matters. I'd double-check the tags for which builds are now triggered and the others look the same from the Git perspective. – Yaegor Nov 25 '17 at 04:00
  • I can try what I want. When in the VCS root the default branch is "refs/heads/master" with Branch Specification "+:refs/tags/(*)" and in the trigger the Branch filter" with +:test_* a GIT tag in the master branch will not be recognized. But if I have in the VCS root in the default branch "refs/heads/dummy" and then I make a GIT tag on Master branch it is recognized and the trigger triggers a build. I tried it so many times.. maybe related to version 10.0.6 which are using ?Thanks in advance! – kevdiablo Dec 07 '17 at 07:10
  • typo: "+:refs/tags/(*)" instead of "+:refs/tags/()" – kevdiablo Dec 07 '17 at 18:03