Skip to content
Snippets Groups Projects
Commit e5c8c81f authored by david_williams's avatar david_williams
Browse files

improve artifact cleanup

parent 07ff6d90
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,7 @@
value="R2.0" />
<property
name="build.distribution"
value="wtp" />
value="wtp" />
<property
name="mapVersionTag"
value="R2_0_maintenance" />
......@@ -254,7 +254,7 @@
</schedule>
</project>
-->
<project
<project
name="incubator-R0.5-I">
<modificationset
quietperiod="120">
......@@ -394,7 +394,7 @@
<property
name="skipCleanBuild"
value="yes" />
-->
-->
</ant>
</schedule>
</project>
......@@ -474,7 +474,7 @@
</schedule>
</project>
<project
name="cleanup-artifacts-N">
name="cleanup-artifacts-B">
<schedule
interval="${time.oneHour}">
<exec
......@@ -482,6 +482,9 @@
command="${env.BUILD_HOME}/releng.control/cleanupArtifacts.sh">
</exec>
</schedule>
<modificationset>
<!-- use empty modification set, to override our default "force only" version in standard plugin definition -->
</modificationset>
<!-- need to prevent, or override, default publishers,
especially since the ant default antpublisher will
result in error, if an ant build hasn't ran -->
......
......@@ -20,7 +20,7 @@ fi
# existence of more recent builds into account, so we never
# delete the last existing build (even if "old").
n=10;
ndays=5;
artifactsDir=${PROJECT_ARTIFACTS};
echo;
......@@ -32,7 +32,7 @@ echo " number of directories before cleaning: ${before}";
# empty directories often result from "bad builds"
find ${artifactsDir} -mindepth 2 -maxdepth 3 -type d -empty -exec rm -fr '{}' \;
# now remove old ones
find ${artifactsDir} -mindepth 2 -maxdepth 2 -ctime +$n -exec rm -fr '{}' \;
find ${artifactsDir} -mindepth 2 -maxdepth 2 -ctime +$ndays -exec rm -fr '{}' \;
after=`find ${artifactsDir} -mindepth 2 -maxdepth 2 | wc -l`;
echo " number of directories after cleaning: ${after}";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment