This Question is Answered

1 "helpful" answer available (2 pts)
3 Replies Last post: Feb 4, 2011 3:54 PM by Dmitry Neverov  
Filip Zawada Newbie 2 posts since
Feb 2, 2011
Currently Being Moderated

Feb 2, 2011 4:40 AM

Automatic creation of build configuration based on Git branches

I use TeamCity with Git. I also use branching model described here: http://nvie.com/posts/a-successful-git-branching-model/ - 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.

Dmitry Neverov JetBrains 310 posts since
Mar 29, 2010
Currently Being Moderated
Feb 4, 2011 10:07 AM in response to: Filip Zawada
Re: Automatic creation of build configuration based on Git branches

Hi Filip,

the functionality you describe should be implemented in the core of the system and we have a feature request http://youtrack.jetbrains.net/issue/TW-7869 you can watch/vote for. Unfortunately, it is not implemented yet.

The good news is that work on http://youtrack.jetbrains.net/issue/TW-8326 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.

Dmitry Neverov JetBrains 310 posts since
Mar 29, 2010
Currently Being Moderated
Feb 4, 2011 3:54 PM in response to: Filip Zawada
Re: Automatic creation of build configuration based on Git branches

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.

More Like This

  • Retrieving data ...