Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I suspect that you are using <a href="https://wiki.jenkins-ci.org/display/JENKINS/Workspace+Cleanup+Plugin" rel="nofollow">Workspace Cleanup Plugin</a>. First thing to do is to check what happens if you do it as a pre-build step, not post-build.</p> <p>Alternatively there is a custom step in the build that tries to wipe out the workspace. See what happens if you invoke it as the first build step, not the last. Or try using the aforementioned plugin.</p> <p>If it does not help, here are other general clenup strategies you may employ:</p> <ul> <li>Start another job as a post-build step that will cleanup for the upstream job.</li> <li>Have a regularly scheduled (say, nightly) job that will do the cleanup. In this case you'll probably need to 'partition' your workspace by builds - i.e. create a separate subdirectory in the workspace for every build instance (keyed by <code>BUILD_ID</code>) so that builds do not accidentally use leftover files from previous builds.</li> <li>Have a cleanup build step in your job. In this case you do not need to create extra jobs. However, as it runs before the build is over it may not be able to cleanup completely (say, it won't be able to delete the artifacts that need to be archived in a post-build step).</li> </ul> <p>To summarize: Yes, you can run you script first, just make sure it does not delete things prematurely. Also examine your job configuration for where that cleanup of yours is called and set it up as a pre-build step or remove it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload