setting up TeamCity to pull multiple git repos with named locations
I am having a problem creating a TeamCity project build that relies on two git repos. In particular, there is content in a primary that relies on a shared repo. This isn’t ideal and needs to change (aka pushing all shared components into nuget), but first things first.
The build machine needs two sibling checkout folders: ‘Project’ and ‘Shared’. Then, from the ‘Project’ folder, I want to kick off a rake task.
Teamcity seems to pull the first ‘Project’ repo, checksout to the /work folder then deletes it and replaces it with a checkout from the ‘Shared’ repo.
Any ideas on how to get this pulling properly?
2 Solutions collect form web for “setting up TeamCity to pull multiple git repos with named locations”
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.
I did not get much from your question. What I understood is that you have code in 2 repos and you want to pull them into a single folder. In such situation I would either use git submodules or git subtree merge.
Reference at http://git-scm.com/book/en/Git-Tools-Submodules
Submodules: Chapter 6.6
Subtree Merging: Chapter 6.7