Automatic creation of build configuration based on Git branches

I use TeamCity with Git. I also use branching model described here: - long story short there are many relatively short-living branches in my repository. Creating new config manualy whenever there's a new branch is a burden and it's screaming for automating.

Now the question is, is it possible to somehow tell TC that I want it to create new build configuration based on some template whenever it detects new branch in my git repo?
I haven't found any way and I don't think it's possible out-of-box. If that is the case, how would you set such environment?
One thing that comes to my mind is having a project with configuration that executes periodically and has one task which job is to check for any new/deleted branches and programatically add/remove build config. That task would be some script that I'd program. Does it make sense? Would it even be possible using TC API? Or do I need to write a regular TC plugin?
The method is not that important as long as I can easily use it in future projects.

Comment actions Permalink

Hi Filip,
the functionality you describe should be implemented in the core of the system and we have a feature request you can watch/vote for. Unfortunately, it is not implemented yet.
The good news is that work on is almost finished. TeamCity will not create a new configuration for each brach, but will run a personal build for changes in specified braches. I think this should work well with your branch model.

Comment actions Permalink

Hi Dmitry,
thanks for the answer.  I've seen these feature requests but I've been thinking about dealing with this scenario on my own untill they are ready. Does "almost finished" mean that 8326 will be part of TC6.1?
PS. Voted for 7869 :).

Comment actions Permalink

6.1.x is a bugfix release, so 8326 will be part of 6.5. The first EAP of 6.5 will be released next week.


Please sign in to leave a comment.