teamcity.git.use.local.mirrors vs teamcity.git.useAlternates

We have a single VCS root which is used in multiple build configurations, all using agent-side checkout. As far as I can tell, this results in a single checkout directory which is updated to the relevant revision by git.

How would the local mirrors option help in this situation? Presumably the mirror will need to update itself as well. Does it only offer a benefit when you need to checkout a revision that is already present in the mirror?

How do alternates compare? Are there any drawbacks to using alternates over local mirrors?

2 comments
Comment actions Permalink

Hi Richard,

In both cases bare .git repository is cloned to buildAgent/system/git folder. The difference is that:

  • teamcity.git.use.local.mirrors - clone .git to the build directory from these local mirrors (obsolete);
  • teamcity.git.useAlternates - do not clone .git, uses a mirror as an alternate repository.
The only difference is that useAlternate saves more space. So please use teamcity.git.useAlternates option. Also since 9.0 version useAlternates will be set to true by default to newly created VCSs and will be configured on the VCS root's level.

If this option is not used then .git is saved in build folder and completely deleted when clean checkout is performed. While the mirror is updated incrementally and could be reused by different build configurations.
0

Please sign in to leave a comment.