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/3f6bc0d6-7d61-4d4c-bf68-bbc4c57a2446%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to