Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity: How to setup a build with two VCS roots

Tags:

build

teamcity

I have two separate projects from two separate TFS VCS roots that I want to be part of the same build and was wondering if this is possible.

Project 1

VCS Root: $/ProductName/Development/Project1

Build file path: API/API.sln

Project 2:

VCS Root: $/QA/Test/Tools/Project2

Build file path: Test/Test.sln

I want step #1 of the build to compile Project 1, and step #2 to compile Project 2. How can I do this if the build file path is relative to the VCS root/checkout directory and the solutions are from two different VCS roots?

Thanks in advance!

like image 882
Keith Avatar asked Jun 10 '13 21:06

Keith


People also ask

How do I add VCS roots in TeamCity?

You can specify portions of the repository to check out and target paths via VCS checkout rules. To view and manage all VCS roots configured within a project, go to Project Settings | VCS Roots. Here, you can filter the project's roots by name and modify other filter options.

How do you set building steps in TeamCity?

In Build Steps, click Auto-detect build steps, and then select the proposed steps you want to add to the current build configuration. You can change their settings afterwards. When scanning the repository, TeamCity progressively searches for project files on the two highest levels of the source tree.


1 Answers

it is possible to have two VCS Roots and change the checkout folder of them (so not check out both in the root folder). For that, change the "Checkout Rule" on our "VCS Roots" dialog and add for your project:

For Project1:

+:.=>project1

And for Project2:

+:.=>project2

Than you get this structure in the root:

root
  - project1
  - project2
like image 128
guenhter Avatar answered Sep 22 '22 22:09

guenhter