23

I have teamcity project that use mercurial. I did a few manually changes to the files in teamcity/buildAgent/work directory. The problem is that now I cannot update the files to the files in the repository.

How can I force re checkout for the teamcity? Is there any option to get rid of the old checkout?

Zoe
  • 23,712
  • 16
  • 99
  • 132
stacker
  • 13,651
  • 17
  • 43
  • 73

3 Answers3

22

There is a "Clean Sources" button on the project or build configuration page somewhere. If you click that the next build will automatically do a full checkout.

EMP
  • 51,372
  • 47
  • 157
  • 214
  • 2
    Also, if you click on the "..." next to the "Run" button on the projects page you can specify "Clean all files in the checkout directory before the build". – aboy021 Mar 29 '16 at 00:21
6

When I removed a Git submodule from my repository, it broke on my CI server.

The "Clean Sources" option did not work for me, but this did (from http://confluence.jetbrains.net/display/TCD4/Clean+Checkout):

TeamCity maintains an internal cache for the sources to optimize communications with the VCS server. The caches are reset during the cleanup time. To resolve problems with sources update, the caches may need to be reset manually. To do this, just delete <TeamCity Data Directory>/system/caches directory.

In my case, I simply had to run this command on the CI server:

rm -Rf ~/.BuildServer/system/caches
Ralf
  • 14,050
  • 9
  • 45
  • 58
5

Here is instructions how to solve this problem:

http://confluence.jetbrains.net/display/TCD4/Clean+Checkout

stacker
  • 13,651
  • 17
  • 43
  • 73