Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2014-07-03 14:38:54 +0000
committerDavid Williams2014-07-03 14:38:54 +0000
commite315c2133c1c71f399a3097055bd8343c8ac74a9 (patch)
tree47a8b8799a4732561f037970496519b1b376c9e1 /production/sdk/cleaners
parentae594b34e764eb4a1e0e87c3cdf4e1373c68892f (diff)
downloadeclipse.platform.releng.aggregator-e315c2133c1c71f399a3097055bd8343c8ac74a9.tar.gz
eclipse.platform.releng.aggregator-e315c2133c1c71f399a3097055bd8343c8ac74a9.tar.xz
eclipse.platform.releng.aggregator-e315c2133c1c71f399a3097055bd8343c8ac74a9.zip
Bug 436736 - Prep for 4.5 (Mars) and 4.4 maintenance builds
Diffstat (limited to 'production/sdk/cleaners')
-rwxr-xr-xproduction/sdk/cleaners/dailyClean.sh76
-rwxr-xr-xproduction/sdk/cleaners/weeklyClean.sh4
2 files changed, 41 insertions, 39 deletions
diff --git a/production/sdk/cleaners/dailyClean.sh b/production/sdk/cleaners/dailyClean.sh
index b1ac11887..203266926 100755
--- a/production/sdk/cleaners/dailyClean.sh
+++ b/production/sdk/cleaners/dailyClean.sh
@@ -4,50 +4,52 @@
cDir="/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4"
buildType="N*"
-allOldBuilds=$( find ${cDir} -maxdepth 1 -type d -ctime +3 -name "${buildType}" )
-#DEBUG echo -e "\n\tallOldBuilds: \n${allOldBuilds}"
+allOldBuilds=$( find ${cDir} -maxdepth 1 -type d -ctime +3 -name "${buildType}*" )
+echo -e "\n\tDEBUG: allOldBuilds: \n${allOldBuilds}"
+
nOldBuilds=$( echo -e "${allOldBuilds}" | wc -l )
-echo -e "nOldBuilds: $nbuildsOldBuilds"
-if (( ${nOldBuilds} > 4 ))
-then
- # Make sure we leave at least 4 on DL server, no matter how old
- # TODO: how to avoid 'ls' (see http://mywiki.wooledge.org/ParsingLs)
- newest=$( ls -1 -t -d ${cDir}/${buildType} | head -4)
- #DEBUG echo -e "\n\tnewest: \n${newest}";
- reNotToDelete=$(printf '%s\n' "${newest[@]}" | paste -sd '|')
- echo "DEBUG: reNotToDelete: ${reNotToDelete}"
- for buildname in ${allOldBuilds}; do
- if [[ $buildname =~ $reNotToDelete ]]
- then
- echo -e "Not removed (since one of 4 newest, even though old): \n$buildname"
- else
- rm -fr $buildname
- RC=$?
- if [[ $RC = 0 ]]
- then
- echo -e "Removed: $buildname"
- else
- echo -e "\n\tAn Error occured removeding $buildname. RC: $RC"
- fi
- fi
- done
-
- nbuilds=$( find ${cDir} -maxdepth 1 -name ${buildType} | wc -l )
- echo "Number of builds after cleaning: $nbuilds"
-
- source /shared/eclipse/sdk/updateIndexFilesFunction.shsource
- updateIndex
-
-else
- echo "Nothing cleaned, not more than 4 days"
-fi
+echo -e "nOldBuilds: $nOldBuilds"
+
+#if (( ${nOldBuilds} > 4 ))
+#then
+ # Make sure we leave at least 4 on DL server, no matter how old
+ # TODO: how to avoid 'ls' (see http://mywiki.wooledge.org/ParsingLs)
+ newest=$( ls -1 -t -d ${cDir}/${buildType} | head -4)
+ #DEBUG echo -e "\n\tnewest: \n${newest}";
+ reNotToDelete=$(printf '%s\n' "${newest[@]}" | paste -sd '|')
+ echo "DEBUG: reNotToDelete: ${reNotToDelete}"
+ for buildname in ${allOldBuilds}; do
+ if [[ $buildname =~ $reNotToDelete ]]
+ then
+ echo -e "Not removed (since one of 4 newest, even though old): \n$buildname"
+ else
+ rm -fr $buildname
+ RC=$?
+ if [[ $RC = 0 ]]
+ then
+ echo -e "Removed: $buildname"
+ else
+ echo -e "\n\tAn Error occured removeding $buildname. RC: $RC"
+ fi
+ fi
+ done
+
+ nbuilds=$( find ${cDir} -maxdepth 1 -name ${buildType} | wc -l )
+ echo "Number of builds after cleaning: $nbuilds"
+
+ source /shared/eclipse/sdk/updateIndexFilesFunction.shsource
+ updateIndex
+
+#else
+# echo "Nothing cleaned, not more than 4 days"
+#fi
# shared (build machine)
# can be aggressive in removing builds from "downloads" and now, with CBI build, from updates too
#find /shared/eclipse/eclipse4N/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +1 -name "N*" -ls -exec rm -fr '{}' \;
find /shared/eclipse/builds/4N/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +1 -name "N*" -ls -exec rm -fr '{}' \;
find /shared/eclipse/builds/4N/siteDir/equinox/drops -maxdepth 1 -ctime +1 -name "N*" -ls -exec rm -fr '{}' \;
-find /shared/eclipse/builds/4N/siteDir/updates/4.4-N-builds -maxdepth 1 -ctime +1 -name "N*" -ls -exec rm -fr '{}' \;
+find /shared/eclipse/builds/4N/siteDir/updates/4.5-N-builds -maxdepth 1 -ctime +1 -name "N*" -ls -exec rm -fr '{}' \;
#
# promotion scripts
find /shared/eclipse/sdk/promotion/queue -name "RAN*" -ctime +2 -ls -exec rm '{}' \;
diff --git a/production/sdk/cleaners/weeklyClean.sh b/production/sdk/cleaners/weeklyClean.sh
index 2b7a49fba..4faad72f0 100755
--- a/production/sdk/cleaners/weeklyClean.sh
+++ b/production/sdk/cleaners/weeklyClean.sh
@@ -14,12 +14,12 @@ find /shared/eclipse/builds/4I/siteDir/eclipse/downloads/drops4 -maxdepth 1 -cti
find /shared/eclipse/builds/4I/siteDir/equinox/drops -maxdepth 1 -ctime +2 -name "I*" -ls -exec rm -fr '{}' \;
-find /shared/eclipse/builds/4I/siteDir/updates/4.4-I-builds -maxdepth 1 -ctime +2 -name "I*" -ls -exec rm -fr '{}' \;
+find /shared/eclipse/builds/4I/siteDir/updates/4.5-I-builds -maxdepth 1 -ctime +2 -name "I*" -ls -exec rm -fr '{}' \;
# don't really need these yet, until after Kepler
find /shared/eclipse/builds/4M/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +2 -name "M*" -ls -exec rm -fr '{}' \;
find /shared/eclipse/builds/4M/siteDir/equinox/drops -maxdepth 1 -ctime +2 -name "M*" -ls -exec rm -fr '{}' \;
-find /shared/eclipse/builds/4M/siteDir/updates/4.3-M-builds -maxdepth 1 -ctime +2 -name "M*" -ls -exec rm -fr '{}' \;
+find /shared/eclipse/builds/4M/siteDir/updates/4.4-M-builds -maxdepth 1 -ctime +2 -name "M*" -ls -exec rm -fr '{}' \;

Back to the top