I recently deleted 2 job from Jenkins (via GUI). When I log into slaves afterwards I still see workspace of those 2 jobs lying around. Is this behavior normal?
Notes:
Regards, Benil
There is a way to clean up a workspace in Jenkins. You need to install the Workspace Cleanup Plugin. This plugin can clean up the workspace before build or after a build. Under Build Environment, check the box that says Delete workspace before build starts.
Login to Jenkins, click on “Manage Jenkins” > “Manage Plugins” > Click on the “Available” tab then search for “workspace cleanup“. You will see various plugins listed. Click on the checkbox for “Workspace Cleanup“, plugin then click on install without reboot tab below the page.
Delete the job provisioner from Jenkins. Navigate to Admin Console->Jenkins->jobs->job-provisions folder, select the necessary provisioner and click the drop-down right to the provisioner name. Select Delete project.
Delete a Jenkins build via GUI. Go into the build you want to delete, and click the Delete this build button in the upper right corner. If you need to clean the Jenkins build history, and reset the build number back to 1, you can run a simple script in Jenkins Script Console.
Unfortunately it is: https://groups.google.com/forum/#!topic/jenkinsci-users/SiZ3DL-UJ-8
Workspaces found on slaves are not deleted because this is a non-trivial problem (it would mean that jobs would need to record every slave the job has ever been executed on and it would also have to take into account slaves that are offline, for a real thorough solution).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With