Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To where should I point the VCS root of TeamCity?

Tags:

I am setting up TeamCity and I am wondering what should be used as the VCS Root.

My svn repository is located at http://obfuscatedserver/svn/main/MyProject1/

Should I set the VCS Root at http://obfuscatedserver/svn/main/MyProject1/ or use the trunk folder at http://obfuscatedserver/svn/main/MyProject1/trunk/ ?

Right now I am not using the trunk folder and I had to set the Build Runner "Build file path" setting to "trunk/MyProject1.proj" (using msbuild).

Which location is the appropriate one?

like image 896
Pierre-Alain Vigeant Avatar asked Oct 13 '09 15:10

Pierre-Alain Vigeant


People also ask

What is VCS root in TeamCity?

A VCS root in TeamCity defines a connection to a version control system. It represents a set of parameters (paths to sources, username, password, and other settings) that determine how TeamCity communicates with a VCS to monitor changes and get sources for a build.

How do I set up TeamCity?

Go to Administration | Projects and open the required project. Alternatively, open the project using the Projects pop-up menu and click Edit Project Settings. The Project Settings page will open. On the Project Settings page, click Create build configuration under the Build Configurations section.


2 Answers

I would recommend using http://obfuscatedserver/svn/main/ as the VCS Root, and then restricting which folders are checked out using checkout rules.

Add the following checkout rules (section 2 of the build config):

  +:/MyProject1/trunk

You will probably also need to update the location of your msbuild file to

  MyProject1/trunk/MyProject1.proj

and set the working directory to

  MyProject1/trunk

This does seem like a lot of work, but next time you want to add a new build, you don't have to create a new VCSroot.

However, the real benefit comes when TeamCity polls your SVN repo. Polling your repo once will discover all the changes for all your builds. This is especially important if your repository is hosted somewhere like sourceforge or googlecode. You certainly don't want to be polling their servers for every build you have configured.

Also, if your repo is hosted by a third party, you might want to set the vcsRoot's Checking interval to once an hour or similar. You can always ask teamcity to check for pending changes from the actions menu on any of the build overview pages if you can't be bothered waiting for the hour to elapse.

like image 108
Net Wolf Avatar answered Sep 22 '22 12:09

Net Wolf


You should use .../trunk/ as it will speed up the checkout, otherwise TeamCity will get all the branches as well which you probably don't need for the build.

like image 38
CrazyCoder Avatar answered Sep 25 '22 12:09

CrazyCoder