We are using TeamCity with Stash and GitFlow.
We have quite a complex dependency chain in TC with 20+ repositories that all produce artefacts that live in a dependant chain. We want to be able to change components without changing everything so certain repos can be branched and worked on while others are untouched. All my dependancies are using the "build from same chain" option.
We are running into difficulties with TCs branch support when dealing with all these dependencies and our branching model. difficulties like builds being a mixture of the wrong sources and the code coverage metrics comparing to the wrong branch. The default branch fall back doesn't seem to cut it.
EG; Builds A -> B -> ,C -> ,D. These are dependant on each other with A being the parent. (Our actual builds are more complex)
We find a bug in live that requires a fix in Repo/Build B
So a developer creates a hotfix branch off from master in Repo B - The other repos are left at master in his dev environment. Codes the fix, tests it locally and commits.
TC builds B, and the chain then also builds A. But because Repo A doesn't have a corresponding hotfix branch it picks the default branch (in my case develop). This then creates an artefact that is a mixture of the wrong branches :(
Feature branches are taken from develop of Build A and features are gradually merged into develop for potential release. This work increases the code coverage on the develop branch for Build A over time.
We find a bug in live that requires another hotfix in Repo/Build A
Dev fixes and commits like before. TC builds fine this time because A is at the top of the chain, but then complains that the code coverage isn't high enough for the build. This is because its compared it to the last default branch build (develop).
I really need a way to describe the branching model to the build/vcs root. Im currently having to build things manually by choosing the dependencies and also turning off coverage failure conditions.
Why not change the default branch?
Changing it to master would solve the two scenarios, but then cause us problems when we want to branch from develop to do our feature work. The same problems arise.
Has anyone run into this? Do you have any suggestions? I really dont want to create another buil, vcs root and dependency chain just to monitor the master/hotfix branches.
TC guys; Is there anything in the backlog to work on this as its a big problem for us? im surprised nothing has been said about it already - i did try to search but nothing came up.
Thanks in advance