Git plugin for custom branching

Is there a way to write a plugin that will dynamically choose the git branch for each VCS root in a build configuration? I would like to be able to define a branch naming scheme that would use a different default branch based on the name of the feature branch that triggered the build.

Background

We have build configurations setup in TeamCity that have many VCS roots. We currently use the following branching scheme:

  • dev
  • rel-[some date] - for example, rel-180401. This branch will be created when preparing a release for production and will exist after we have released to production. We do not use a master branch.
  • feature-[some feature, bug fix or hot fix]. This can be a branch off of dev or a release branch

The default branch for all of the VCS roots is currently dev.

Problem

If someone makes a feature branch off of one of the release branches and that change only involves 1 VCS root, the build for the feature branch will sometimes fail. This is because other VCS roots are defaulting to dev and the dev branch has changes that are incompatible with the state of the feature branch.

I would like to be able to define a feature branch with a name like rel-180401_fix-exception and have TeamCity use the rel-180401 as the default branch for all other VCS roots that do not have a matching rel-180401_fix-exception branch. Is this possible?

 

 

1 comment

Due to the lack of response, I'm guessing that this isn't possible.

0

Please sign in to leave a comment.