Issue
We are running Jenkins 2.x and love the new Pipeline plugin. However, with so many branches in a repository, disk space fills up quickly.
Is there any plugin that's compatible with Pipeline that I can wipe out the workspace on a successful build?
Solution
You can use deleteDir()
as the last step of the pipeline Jenkinsfile (assuming you didn't change the working directory).
Answered By - Krzysztof KrasoĊ
Answer Checked By - Gilberto Lyons (JavaFixing Admin)