Reputation: 4392
In Jenkins I'm using private Maven repositories (local to the workspace) to avoid Maven repo concurrency issues.
I'm finding that Jenkins deletes this repo folder ([jenkins home]/jobs/[job]/workspace/.repository
) every build, which is a pain as this means Maven downloads its whole universe of jars for every build.
I have checked my SCM (Accurev) plugin and modified its code so that it doesn't purge the workspace when starting a build. However, something else in Jenkins is still deleting the workspace.
I'm not using the Workspace Cleanup plugin or any similar.
UPDATE: turns out I hadn't modified the Accurev plugin code properly. Re-visiting this was the solution
Upvotes: 4
Views: 2570
Reputation: 4392
After much tinkering I discovered the Accurev plugin was in fact still deleting my workspace after my code change to it.
I fixed my code. Jenkins no longer clears my whole workspace.
So - in conclusion, it's generally your SCM plugin that's deleting files from your job workspace.
Upvotes: 1