Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can TeamCity trigger builds for new Git branches/tags?

Tags:

teamcity

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.

like image 383
pronvit Avatar asked Jun 23 '14 00:06

pronvit


1 Answers

@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.
like image 73
Biswajit_86 Avatar answered Sep 22 '22 23:09

Biswajit_86