Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2013-02-21 18:07:39 +0000
committerDavid Williams2013-02-21 18:07:39 +0000
commit992af6ab27fb6f3ebd7d772111cd53cd782378ff (patch)
treea7f4d1230e51537145d0f88448562783fe7c7f29 /production/sdk/cleaners
parent27ca26976f8ecab74ddd20a66841b411085e46b1 (diff)
downloadeclipse.platform.releng.aggregator-992af6ab27fb6f3ebd7d772111cd53cd782378ff.tar.gz
eclipse.platform.releng.aggregator-992af6ab27fb6f3ebd7d772111cd53cd782378ff.tar.xz
eclipse.platform.releng.aggregator-992af6ab27fb6f3ebd7d772111cd53cd782378ff.zip
Bug 398041 - [CBI] remove eclipsebuilder as submodule (prep)
Diffstat (limited to 'production/sdk/cleaners')
-rwxr-xr-xproduction/sdk/cleaners/dailyClean.sh33
-rwxr-xr-xproduction/sdk/cleaners/weeklyClean.sh38
2 files changed, 71 insertions, 0 deletions
diff --git a/production/sdk/cleaners/dailyClean.sh b/production/sdk/cleaners/dailyClean.sh
new file mode 100755
index 000000000..b8d089494
--- /dev/null
+++ b/production/sdk/cleaners/dailyClean.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+# TODO: The idea is to remove builds over 4 days old, but leave at least 4 on site.
+# This logic, though, in theory, depending on when ran, could find say 6 builds,
+# then remove them all if all older than 4 days.
+nbuilds=$( find /home/data/httpd/download.eclipse.org/eclipse/downloads/drops4 -maxdepth 1 -name "N*" -exec echo '{}' \; | wc -l )
+if [[ nbuilds > 4 ]]
+then
+ echo "Number of builds before cleaning: $nbuilds"
+ find /home/data/httpd/download.eclipse.org/eclipse/downloads/drops4 -maxdepth 1 -ctime +3 -name "N*" -exec echo '{}' \;
+ find /home/data/httpd/download.eclipse.org/eclipse/downloads/drops4 -maxdepth 1 -ctime +3 -name "N*" -exec rm -fr '{}' \;
+ nbuilds=$( find /home/data/httpd/download.eclipse.org/eclipse/downloads/drops4 -maxdepth 1 -name "N*" -exec echo '{}' \; | wc -l )
+ echo "Number of builds after cleaning: $nbuilds"
+ source /shared/eclipse/sdk/updateIndexFilesFunction.shsource
+ updateIndex 4 PDE
+
+else
+ echo "Nothing cleaned, not more than 4 days"
+fi
+
+# shared (build machine)
+# can be aggressive in removing builds from "downloads", but not "updates"
+find /opt/public/eclipse/eclipse4N/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +1 -name "N*" -exec echo '{}' \;
+find /opt/public/eclipse/eclipse4N/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +1 -name "N*" -exec rm -fr '{}' \;
+
+find /opt/public/eclipse/eclipse4N/siteDir/equinox/drops -maxdepth 1 -ctime +1 -name "N*" -exec echo '{}' \;
+find /opt/public/eclipse/eclipse4N/siteDir/equinox/drops -maxdepth 1 -ctime +1 -name "N*" -exec rm -fr '{}' \;
+#
+# promotion scripts
+find /opt/public/eclipse/sdk/promotion/queue -name "RAN*" -ctime +2 -exec echo '{}' \;
+find /opt/public/eclipse/sdk/promotion/queue -name "RAN*" -ctime +2 -exec rm '{}' \;
+
+
diff --git a/production/sdk/cleaners/weeklyClean.sh b/production/sdk/cleaners/weeklyClean.sh
new file mode 100755
index 000000000..5c8154714
--- /dev/null
+++ b/production/sdk/cleaners/weeklyClean.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+# clean 4.x M builds
+find /home/data/httpd/download.eclipse.org/eclipse/downloads/drops4 -maxdepth 1 -ctime +30 -name "M*" -exec echo '{}' \;
+find /home/data/httpd/download.eclipse.org/eclipse/downloads/drops4 -maxdepth 1 -ctime +30 -name "M*" -exec rm -fr '{}' \;
+# clean 3.x M builds
+find /home/data/httpd/download.eclipse.org/eclipse/downloads/drops -maxdepth 1 -ctime +30 -name "M*" -exec echo '{}' \;
+find /home/data/httpd/download.eclipse.org/eclipse/downloads/drops -maxdepth 1 -ctime +30 -name "M*" -exec rm -fr '{}' \;
+
+source /shared/eclipse/sdk/updateIndexFilesFunction.shsource
+/shared/eclipse/sdk/updateIndexes.sh
+
+
+# shared (build machine)
+# can be aggressive in removing builds from "downloads", but not "updates"
+
+find /opt/public/eclipse/eclipse4I/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +2 -name "I*" -exec echo '{}' \;
+find /opt/public/eclipse/eclipse4I/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +2 -name "I*" -exec rm -fr '{}' \;
+
+find /opt/public/eclipse/eclipse4I/siteDir/equinox/drops -maxdepth 1 -ctime +2 -name "I*" -exec echo '{}' \;
+find /opt/public/eclipse/eclipse4I/siteDir/equinox/drops -maxdepth 1 -ctime +2 -name "I*" -exec rm -fr '{}' \;
+
+find /opt/public/eclipse/eclipse4M/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +2 -name "M*" -exec echo '{}' \;
+find /opt/public/eclipse/eclipse4M/siteDir/eclipse/downloads/drops4 -maxdepth 1 -ctime +2 -name "M*" -exec rm -fr '{}' \;
+find /opt/public/eclipse/eclipse4M/siteDir/equinox/drops -maxdepth 1 -ctime +2 -name "M*" -exec echo '{}' \;
+find /opt/public/eclipse/eclipse4M/siteDir/equinox/drops -maxdepth 1 -ctime +2 -name "M*" -exec rm -fr '{}' \;
+
+find /opt/public/eclipse/eclipse3M/siteDir/eclipse/downloads/drops -maxdepth 1 -name "M*" | wc -l
+find /opt/public/eclipse/eclipse3M/siteDir/eclipse/downloads/drops -maxdepth 1 -ctime +2 -name "M*" -exec echo '{}' \;
+find /opt/public/eclipse/eclipse3M/siteDir/eclipse/downloads/drops -maxdepth 1 -ctime +2 -name "M*" -exec rm -fr '{}' \;
+find /opt/public/eclipse/eclipse3M/siteDir/eclipse/downloads/drops -maxdepth 1 -name "M*" | wc -l
+
+find /opt/public/eclipse/eclipse3M/siteDir/equinox/drops3 -maxdepth 1 -name "M*" | wc -l
+find /opt/public/eclipse/eclipse3M/siteDir/equinox/drops3 -maxdepth 1 -ctime +2 -name "M*" -exec echo '{}' \;
+find /opt/public/eclipse/eclipse3M/siteDir/equinox/drops3 -maxdepth 1 -ctime +2 -name "M*" -exec rm -fr '{}' \;
+find /opt/public/eclipse/eclipse3M/siteDir/equinox/drops3 -maxdepth 1 -name "M*" | wc -l
+
+

Back to the top