How can I cleanup the workspace in Jenkins? I am using AccuRev
as version control tool.
I created freestyle
projects in Jenkins.
If you want to just remove one dir (or file) you can use Groovy and Manage Jenkins → Scripts Console run a script which removes it.
For example, you can look at the files with:
dh = new File('./bitnami/jenkins/jenkins_home/workspace/jobname/folder')
dh.eachFile {
println(it)
}
And then, when you have the folder you want to delete in dh
, you could simply append the next code:
dh.deleteDir()
And it will be deleted.
Note: The path shown in the example is for a Bitnami Jenkins installation, yours could be different.