Quantcast

How to purge old builds

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to purge old builds

David Ngan

Is there an easy way (a plugin?) to remove old builds? We have jobs that have hundreds of old builds that are no longer needed and which consume quite a bit of disk space. I can delete the folders under the jobs/<jobname>/builds folder through the file system, but that still leaves the links to the individual builds in the left pane of the Hudson pages. I want to delete the builds completely from Hudson, including the links, just as if using the “Delete this build” button. It would be ideal to be able to specify the starting and ending build numbers to delete.

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to purge old builds

Marc Lustig
Why don't you use the build-in feature "remove old builds"?

2009/7/25 David Ngan <[hidden email]>:

> Is there an easy way (a plugin?) to remove old builds? We have jobs that
> have hundreds of old builds that are no longer needed and which consume
> quite a bit of disk space. I can delete the folders under the
> jobs/<jobname>/builds folder through the file system, but that still leaves
> the links to the individual builds in the left pane of the Hudson pages. I
> want to delete the builds completely from Hudson, including the links, just
> as if using the “Delete this build” button. It would be ideal to be able to
> specify the starting and ending build numbers to delete.
>
>
>
>



--
Mit freundlichen Grüßen / Regards
  Marc Lustig

Lustig IT-Consulting
Selma-Lagerlöf-Str. 92
81829 München
Tel. +49 (0)163-3798237
Fax +49 (0)89-38535572
Email: [hidden email]
Steuer-Nr.: 145/184/90649
USt-ID-Nr.: DE246455267

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How to purge old builds

David Ngan
"Discard old builds" is useful in many situations, either by days or number of builds. Sometimes it would be helpful to be able to discard all builds prior to build 7500, for example, where build 7500 might be a special release or maintenance build. A kind of one-time clean-up operation where the builds deleted are determined by a build number rather than by days or number of builds.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Marc Lustig
Sent: Saturday, July 25, 2009 3:25 PM
To: [hidden email]
Subject: Re: How to purge old builds

Why don't you use the build-in feature "remove old builds"?

2009/7/25 David Ngan <[hidden email]>:

> Is there an easy way (a plugin?) to remove old builds? We have jobs that
> have hundreds of old builds that are no longer needed and which consume
> quite a bit of disk space. I can delete the folders under the
> jobs/<jobname>/builds folder through the file system, but that still leaves
> the links to the individual builds in the left pane of the Hudson pages. I
> want to delete the builds completely from Hudson, including the links, just
> as if using the "Delete this build" button. It would be ideal to be able to
> specify the starting and ending build numbers to delete.
>
>
>
>



--
Mit freundlichen Grüßen / Regards
  Marc Lustig

Lustig IT-Consulting
Selma-Lagerlöf-Str. 92
81829 München
Tel. +49 (0)163-3798237
Fax +49 (0)89-38535572
Email: [hidden email]
Steuer-Nr.: 145/184/90649
USt-ID-Nr.: DE246455267

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to purge old builds

Qazwart-2
In reply to this post by David Ngan
The easiest way is to change the configuration for that project to delete old builds when you create a new build. This allows you to specify how old a build has to be in order to delete, or how many builds you want to keep.

If there are specific builds you want to keep, you can go into that build once you've set the delete old build option, and then click on the "Keep this build forever" button. Then, trigger a build, and the old builds you want to delete are purged from Hudson.

I've dones purging using "find $dir -mtime +$age -rm" where age is the oldest date you want to keep the build (in days). This will get rid of the builds and the links. You may have to restart Hudosn once this is done in order for the GUI to show that the builds are no longer available.

On Sat, Jul 25, 2009 at 1:13 PM, David Ngan <[hidden email]> wrote:

Is there an easy way (a plugin?) to remove old builds? We have jobs that have hundreds of old builds that are no longer needed and which consume quite a bit of disk space. I can delete the folders under the jobs/<jobname>/builds folder through the file system, but that still leaves the links to the individual builds in the left pane of the Hudson pages. I want to delete the builds completely from Hudson, including the links, just as if using the “Delete this build” button. It would be ideal to be able to specify the starting and ending build numbers to delete.

 

 




--
David Weintraub
[hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How to purge old builds

David Ngan

Good information. This should work for me. Thanks!

 


From: David Weintraub [mailto:[hidden email]]
Sent: Sunday, July 26, 2009 12:27 PM
To: [hidden email]
Subject: Re: How to purge old builds

 

The easiest way is to change the configuration for that project to delete old builds when you create a new build. This allows you to specify how old a build has to be in order to delete, or how many builds you want to keep.

If there are specific builds you want to keep, you can go into that build once you've set the delete old build option, and then click on the "Keep this build forever" button. Then, trigger a build, and the old builds you want to delete are purged from Hudson.

I've dones purging using "find $dir -mtime +$age -rm" where age is the oldest date you want to keep the build (in days). This will get rid of the builds and the links. You may have to restart Hudosn once this is done in order for the GUI to show that the builds are no longer available.

On Sat, Jul 25, 2009 at 1:13 PM, David Ngan <[hidden email]> wrote:

Is there an easy way (a plugin?) to remove old builds? We have jobs that have hundreds of old builds that are no longer needed and which consume quite a bit of disk space. I can delete the folders under the jobs/<jobname>/builds folder through the file system, but that still leaves the links to the individual builds in the left pane of the Hudson pages. I want to delete the builds completely from Hudson, including the links, just as if using the “Delete this build” button. It would be ideal to be able to specify the starting and ending build numbers to delete.

 

 




--
David Weintraub
[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to purge old builds

Kohsuke Kawaguchi
Administrator
In reply to this post by David Ngan
David Ngan wrote:
> "Discard old builds" is useful in many situations, either by days or number of builds. Sometimes it would be helpful to be able to discard all builds prior to build 7500, for example, where build 7500 might be a special release or maintenance build. A kind of one-time clean-up operation where the builds deleted are determined by a build number rather than by days or number of builds.

This would be a good CLI.

  java -jar hudson-cli.jar delete-builds myproject -7500

Any volunteer :-) ?

>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Marc Lustig
> Sent: Saturday, July 25, 2009 3:25 PM
> To: [hidden email]
> Subject: Re: How to purge old builds
>
> Why don't you use the build-in feature "remove old builds"?
>
> 2009/7/25 David Ngan <[hidden email]>:
>> Is there an easy way (a plugin?) to remove old builds? We have jobs that
>> have hundreds of old builds that are no longer needed and which consume
>> quite a bit of disk space. I can delete the folders under the
>> jobs/<jobname>/builds folder through the file system, but that still leaves
>> the links to the individual builds in the left pane of the Hudson pages. I
>> want to delete the builds completely from Hudson, including the links, just
>> as if using the "Delete this build" button. It would be ideal to be able to
>> specify the starting and ending build numbers to delete.
>>
>>
>>
>>
>
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to purge old builds

sourabhgaikwad
This post has NOT been accepted by the mailing list yet.
Thanks, Kohsuke Kawaguchi. it works. Just need minor chnage

java -jar jenkins-cli.jar -s http://my.jenkins.host delete-builds myproject '1-7499' --username $user --password $password
Deleted 7499 builds
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to purge old builds

lfast1
Is Delete-old-builds only available on a build-by-build basis?  Is there a global default I can set?  Two reasons.
1. I have a lot of old builds everywhere and I'm just turning on delete-old-builds.
2. I don't want one or more mis-configured jenkins runs to fill up my disk.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to purge old builds

shanmuga_r
Try Configration slicing plugin to discard old builds
https://wiki.jenkins-ci.org/display/JENKINS/Configuration+Slicing+Plugin
Loading...