2
votes

This question is identical to this one, but related to Perforce instead of SVN. In Perforce we have these branches:

Development\ProjectA\Trunk 
Development\ProjectA\Release1
Development\ProjectA\Release2

In TeamCity should there be 3 separate VCS roots or 1 with checkout rules specified for each build?

Following the advice of the accepted answer in the linked question I changed our setup to have a single VCS root contain everything. The performance is dire with an initial checkout taking 45 minutes.

The build configurations are set to checkout server side and have checkout rules such as:

-:.
+:Development/ProjectA/Trunk 

I'm worried this setup isn't scalable. If with 3 branches it takes 45 minutes, a few more releases and the checkout time will be prohibitive. What is best practice for setting up Perforce VCS roots for large repositories in TeamCity?

2

2 Answers

3
votes

After contacting Jetbrains support, this was the answer:

The checkout rules are not efficient with Perforce and server-side checkout, we have a separate issue for this performance problem, but I cannot tell you its ID right now. Right now, with server side checkout, TeamCity checks out whole VCS root and after that filters the necessary data according to checkout rules.

The solutions for your problem could be:

  • Use checkout on agent. TeamCity perform agent-side checkout efficiently, by creating a dedicated perforce workspace from VCS root configuration and checkout rules.
  • use checkout on server, but use dedicated VCS Root configurations.
0
votes

The described problem should be resolved in the coming TeamCity 10.0.2 release, here is the issue in TeamCity tracker:

https://youtrack.jetbrains.com/issue/TW-13453