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?
The checkout rules affect what build changes are displayed in the UI and what files are checked out for a build on the agent. If a commit does not match any of the checkout rule patterns of the build's VCS root, TeamCity will completely ignore it.
Clean Checkout (also referred to as Clean Sources) is an operation that ensures that the next build will get a copy of the sources fetched all over from the VCS. All the content of the Build Checkout Directory is deleted, and the sources are refetched from the version control.
The VCS Checkout mode is a setting that affects how project sources reach an agent. This mode affects only sources checkout. The current revision and changes data retrieving logic is executed by the TeamCity server, and thus TeamCity server needs to access the VCS server in any mode.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With