This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 203169 - Create script to clean up the builds not linked from COSMOS downloads page
Summary: Create script to clean up the builds not linked from COSMOS downloads page
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bobby CLA
QA Contact: Jagmit CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-12 18:41 EDT by Balan Subramanian CLA
Modified: 2012-01-03 13:53 EST (History)
3 users (show)

See Also:


Attachments
cosmos purge script (1000 bytes, application/octet-stream)
2008-02-06 02:39 EST, Bobby CLA
no flags Details
script to purge dev builds (1.84 KB, application/octet-stream)
2008-02-22 09:14 EST, Bobby CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Balan Subramanian CLA 2007-09-12 18:41:26 EDT
Only the last 5 builds are linked from the COSMOS download page at http://www.eclipse.org/cosmos/downloads/?ver=1.0.0. Whenever a build is no longer linked from this page it must be removed. An automated script to do this can be created and run as a cron job so that only 5 builds are kept at a time int he build folder. The removal can be based on timestamp when there is more than 5. There may also be a file that has the file names that are currently available on the download page. The others can be deleted.
Comment 1 Bobby CLA 2007-09-26 18:10:15 EDT
This bug was discussed during the last (09/25/07) COSMOS IBM Rel Engg team  call. 

Following points were raised during the discussion:

1) All the published builds are added to publish_1.0.0.txt file in eclipse server, even though only the last five dev builds are shown in the page.

2) Since all nightly and manual builds are published and updates the above list, deleting all builds which are not linked from the web page could delete a build which might be required later. 

3) Currently eclipse server monitors alloted quota and sends reminder emails when quota is reached.

Hubert suggested to delete only development builds that are older than 10 days, and if there are more than 5 development builds on the server. Also this script should be documented in the rel engg process. 
Comment 2 Bobby CLA 2008-02-06 02:39:48 EST
Created attachment 88968 [details]
cosmos purge script

I am attaching a shell script which can be used to purge failed builds which are older than x days.

Syntax: cleanup_cosmos.sh <cosmos_build_path> <older than n days> <list OR delete>
eg: cleanup_cosmos.sh /shared/technology/cosmos/downloads/COSMOS/1.0.0 5 delete

Above eg will delete all failed builds older than 5 days.
Comment 3 John Devine CLA 2008-02-07 11:44:39 EST
(In reply to comment #2)

Bobby, I spoke to Leonard, who's currently the nominal owner of this bug.  He's been OOTO the past week or so, and was unaware that this had been slated for i9.  The good news though is that it appears that you've already posted a script to address this.   Is there any additional effort required by Leonard?
Comment 4 John Devine CLA 2008-02-13 10:45:43 EST
Just noticed that Bobby is not on the CC list for this bug.   Sent e-mail directly to him to confirm that this bug has been resolved by his script.  At present Len is not woring on this, and we have not scheduled his time for this.
Comment 5 Ruth Lee CLA 2008-02-21 15:53:20 EST
Reassigning to Bobby to drive the rest of this work. Moved Len's name to the cc list so that if he will work on this with Bobby he's kept in the loop. I believe that the only thing left to do for this bug is to check in Bobby's script. 
Comment 6 Ruth Lee CLA 2008-02-21 15:54:04 EST
Moving out to i10 because this isn't a stop-ship for i9. 
Comment 7 Bobby CLA 2008-02-22 09:14:23 EST
Created attachment 90463 [details]
script to purge dev builds


Syntax: clean_dev_builds.sh <cosmos_builds_path> <publish_list_path> <list OR delete>

eg: clean_dev_builds.sh /www/cosmos/downloads/COSMOS/1.0.0 /www/cosmos/downloads/COSMOS/1.0.0/publish_1.0.0.txt delete
Comment 8 Bobby CLA 2008-02-22 09:18:09 EST
I am attaching the script to purge all dev builds which are older than given number of days. Found that we cant just delete all builds not linked from publish list since all the builds are posted to this even though the download page displays only the last five.

Syntax: clean_dev_builds.sh <cosmos_builds_path> <publish_list_path> <list OR delete>

eg: clean_dev_builds.sh /www/cosmos/downloads/COSMOS/1.0.0 /www/cosmos/downloads/COSMOS/1.0.0/publish_1.0.0.txt delete

list mode - identifies the builds to purge and lists them (don't delete)
delete mode - lists and deletes

Also suggest to direct the output of the script to a file in appending mode so that we have a log to check in case of any issues...
for eg: clean_dev_builds.sh /www/cosmos/downloads/COSMOS/1.0.0 /www/cosmos/downloads/COSMOS/1.0.0/publish_1.0.0.txt delete >> auto_purge.log

This could be added as a cron job, with the parameters.