Teamcity build referencing two git roots- naming problem

I have a project that has two roots that are siblings of each other - and one references the other.  Let me explain.

I have two repos that live off the same directory location:

There are items in /Project that make a relative reference to 'Shared' by virtue of a '../Shared/content/' style link.

This means that when the projects are being checked out by TeamCity, I need it to checkout to two sibling folders.  

Currently, it appears the first repo checkout is pulled into the generated directory under 'work', but it is deleted and then replaced by the second repo checkout.

I tried 'submodules' but the branching mechanics are too wonky.

If you say "why in the world are you doing it this way", I agree.  But we are transitioning some TFS repos to git.  My first task is to get them working - then I'll refactor the relationship next.

Thank you for any thoughts on this one,
1 comment
Comment actions Permalink

Never mind - I just found the solution.

I  found that I can move the entire tree by setting the VCS Root 'Checkout rules' on the repository definition by using the following rule entry:


This rule says effectively "for the root folder of this repository and everything under it, move it all under a folder called 'Shared'.  I then do the same for the 'Project' repo, moving it to the 'Project' folder and I now have two discrete sibling folders setup under the workspace at build time.


Please sign in to leave a comment.