summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-20 21:15:13 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-20 21:15:13 +0100
commit80700a4cb692e4c716fcc1c1e66db259b9ff1ddc (patch)
tree1dc24473c5a6502d18cddea4f6fc6c61ca88fb78 /bin
parent12e46121dbb8ddb131ba49b5d07b34d25100b502 (diff)
downloadjenkins.debian.net-80700a4cb692e4c716fcc1c1e66db259b9ff1ddc.tar.xz
reproducible: dont cleanup the top-level artifacts directory
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_maintainance.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/reproducible_maintainance.sh b/bin/reproducible_maintainance.sh
index 97e588d2..2a8ee1e1 100755
--- a/bin/reproducible_maintainance.sh
+++ b/bin/reproducible_maintainance.sh
@@ -202,11 +202,11 @@ if [ ! -z "$OLDSTUFF" ] ; then
fi
# remove artifacts older than 3 days
-mkdir -p /var/lib/jenkins/userContent/artifacts
-ARTIFACTS=$(find /var/lib/jenkins/userContent/artifacts -maxdepth 1 -type d -mtime +3 -exec rm -rv {} \;)
+ARTIFACTS=$(find /var/lib/jenkins/userContent/artifacts/* -maxdepth 0 -type d -mtime +3 -exec ls -lad {} \; || true)
if [ ! -z "$ARTIFACTS" ] ; then
echo
- echo "Removed $ARTIFACTS artifacts."
+ echo "Removed old artifacts:"
+ find /var/lib/jenkins/userContent/artifacts/* -maxdepth 0 -type d -mtime +3 -exec rm -rv {} \;
echo
fi