Large repository, snapshot dependencies and pending changes

Hi all, I'm looking for a workaround or a solution to improve my TeamCity setup. I have a single large repository containing many projects and many projects depends on other projects. So my setup looks like this:

Project_A needs Project_B need Project_C. So Project_A has a snapshot dependency on Project_B (also with artifact dependency) and Project_B had a snapshot dependency on Project_C (with artifact dependency). Also, I have a build trigger on depending projects, and another build trigger on a VCS root with a rule specifying only to check in that project folder. Everything is working very well.

BUT! Let's say that Project_C if only modified once a year, Project_B once a week, and Project_C daily. With this setup, everything is always built every time someone commits in any of the folder of these projects. For example:

- Someone commits a change in Project_C (the "daily" project)
- TeamCity detects pending changes on ALL projects since they use the same VCS root (it's the same repo)
- Project_C should build first but it verifies its snapshot dependencies.
- Since there are pending changes on the other projects (because they are on the same VCS root) Project_A is first build, then Project_B and then Project_C.

I don't want to build Project_A and B since nothing has changed in them and Project_C uses their artifacts.

Is there a workaround for that? I don't want to rebuild my entire build chain every time something changes on my main project. I have lots of project and large build chains and it really impacts TeamCity's performances.



Comment actions Permalink

Is it correct that for Project_C to be built you only need a fraction of sources of the VCS root?

Comment actions Permalink

(sorry for the delay)

Yes exactly, Projects A, B and C each avec their folders on my big repository. I keep that simple for the explanation, for I have lots of projects in a 500MB repository.

Since my last post, I have tried a workaround: I added checkout rules to every project that I have. For example, for my project A:


That seemed to work but I have another problem. Since my repository is large, the first build on each agent (we have 10 agents) is really slow - between 10-20 minutes depending on the traffic on the mercurial server. That's not a big deal, I supposed that after the first build everything will be fast. Which is true BUT I don't know why, after a period of time a clean checkout is done "Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist". But that build was done 11 days ago (on EMGSCOMPIL07). Is there an auto cleanup what would erase the temporary files? I am doing something wrong?

Oh, I used TC 8.0.2 and just upgraded to 8.0.3.

Thank you!


Please sign in to leave a comment.