Cleanup of system\git folder on TeamCity agents
Hi,
We are using TeamCity Enterprise 2024.07.1 (build 160635) and we recently migrated the sources for one of the huge projects from TFS to GIT.
We created VCS root for this GIT repository with checkout policy “Use mirrors” and TeamCity seems to keep a local copy of the repository on the build agents under system\git folder.
Now, the problem we are facing is, since the related repository folder under system\git is huge and it is persisted, TeamCity is unable to meet the free disk space requirement of few builds and they fail.
We cannot expand the disk on the agents. Hence, would like to know if there is a way to tell TeamCity to cleanup also the folders under system\git to meet the free space requirement of the builds.
Thanks
Please sign in to leave a comment.
It is safe to delete the directories under system/git manually. However, the agent will recreate them on the next build. You may wish to select the "Do not use mirrors" option instead if you plan to delete these directories frequently.
Best regards,
Anton
Hi Anton,
Thanks for the update. Actually the builds which require lot of space do not run frequently and hence we wanted to make use of the benefit of “Use mirrors” while also making sure the build with huge disk space requirement is successful when it runs.
But looks like “Do not use mirrors” option is the way to go.
Thanks,
Paul