TeamCity compilation of many projects

62 Views Asked by At

I have question about correct configuration of VCS in TeamCity for projects. I have a lot of small projects in one repository on GIT. It implies a lot of projects for one template in TC.

Because of that TC works very slow. For example 300 projects could compile all day. I found the reason, in version control settings, when I want to download only one project from git I have to set checkout rules and define path to it. This cause clearing and downloading new source codes for every compilation on TC.

When I clear checkout rules and TC agent download all repository it work fast and download only changes from git, not re-download all files of project like before. After this change projects compile 2h. Problem with that configuration is showing changes in TC project for whole repository, when someone add new commit it appear to every project and is in history.
Do anyone know how to configure TC for working correct in that situation?

Additionally configuration issue which is necessary for every project is VCS for downloading external codes repository and common codes from the same repository where is project but different path.

For example:
C:\Projects\3rdPartySources\ - [for every project, different repository]
C:\Projects\src\ProjectA\ - [same repository]
C:\Projects\src\ProjectB\ - [same repository]
C:\Projects\src\ProjectC\ - [same repository]

1

There are 1 best solutions below

0
On

Inside the VCS Checkout rules, you can specify specific rules like this:

+:Common
+:ProjectA

Or, you even can specify a custom variable :

+:Common
+:%PathToBuild%

Then, you will just have to set this var inside the "parameters" tab on each build configuration. And, you will use the same checkout rules everywhere in your configuration.