How can I cleanup the workspace in Jenkins? I am using AccuRev as version control tool.
I created freestyle projects in Jenkins.
Join Stack Overflow to learn, share knowledge, and build your career.
|
How can I cleanup the workspace in Jenkins? I am using I created |
||||
|
|
|
There is a way to cleanup workspace in Jenkins. You can clean up the workspace before build or after build. First, install Workspace Cleanup Plugin. To clean up the workspace before build: Under Build Environment, check the box that says Delete workspace before build starts. To clean up the workspace after the build: Under the heading Post-build Actions select Delete workspace when build is done from the Add Post-build Actions drop down menu. |
|||||
|
|
If you want to manually clean it up, for me with my particular version of jenkins (I didn't appear to need an extra plugin installed for this, but who knows), there is a "workspace" link on the left column, click it, then a "Wipe out current workspace" link appears beneath it on the left hand side column. |
||||
|
|
|
Beside above solutions, there is a more "COMMON" way - directly delete the largest space consumer from Linux machine. You can follow the below steps:
|
|||||||||||||||||
|
|
You can run the below script in the Manage Jenkins → Scripts Console for deleting the workspaces of all the jobs at one shot. We did this to clean up space on the file system.
|
|||||
|
|
You will need to install this plugin before the options mentioned above will appear This plugin add the check box to all job configs to allow you to delete the whole workspace before any steps (inc source control) are run This is useful to make sure you always start from a known point to guarantee how you build will run |
|||||||||||||
|