Thanks Victor for your suggestion. I also came accross this http://stackoverflow.com/questions/28488389/jenkins-how-to-run-one-housekeeping-job-on-all-nodes-slaves-master
I haven't tried it yet, but i will be looking into the plugin in this SO post. I will update back Regards! On Thursday, February 11, 2016 at 2:43:29 AM UTC-6, Victor Martinez wrote: > > Hi, > > I don't know if there is already a specific plugin for doing that, the > closest feature afaik is already implemented by > https://wiki.jenkins-ci.org/display/JENKINS/Maintenance+Jobs+Scheduler+Plugin > which will cronly remove/disable jobs older than X days. > > It would be easy to adapt it to cleanup workspaces older than one month or > so. > > Otherwise you might need to create your own groovy script to iterate > through each slave/job and filter workpsaces older than X days then wipe > them out. > > Cheers > > On Thursday, 11 February 2016 05:06:40 UTC, ok999 wrote: >> >> >> A job/pipeline is using custom workspace. The job is set-up in such a way >> that every build creates there own workspace inside the main/default >> workspace. So, if the actual workspace is >> *"D:\jenkins\workspace\<job_name>"*, each run of the job/pipeline is >> creating there own workspace like >> >> >> >> >> *"D:\jenkins\workspace\<job_name>\1""D:\jenkins\workspace\<job_name>\2""D:\jenkins\workspace\<job_name>\3"* >> . >> . >> . >> This lock down of workspace is implemented as per a requirement. >> >> If the job is successful, these workspaces are deleted in a stage using >> the *deletedir(). *But if the job fails, i leave them for postmortem. >> >> Is there any standard/recommended way to clean up the entire workspace in >> a scheduled way (like once a month)? I have a pool of slaves and the >> scheduled job should clean in all slaves. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5a22eeae-f1cf-423f-9e17-1116601b51fb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
