We are using an Enterprise version of TeamCity 2017. We experience an issue that is reproduced like this:
- Start a build
- Immediately cancel it
- Start a build
at this point, an exception in TeamCity occurs, that looks like this:
I investigated it, and found out that it is because of a file lock in the checkout directory. A solution was to just manually kill processes that lock files in a separate build step. But this step is not invoked when the build is cancelled BEFORE THE FIRST BUILD STEP IS INVOKED. So all in all, the locks are not released, and TeamCity can't perform a clean.
I tried using the Swabra plugin, but it seemingly has no effect (as if it is not even working)
