[Qa-jenkins-scm] [jenkins.debian.net] 05/05: reproducible: dont cleanup the top-level artifacts directory

Holger Levsen holger at moszumanska.debian.org
Fri Mar 20 20:15:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 80700a4cb692e4c716fcc1c1e66db259b9ff1ddc
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Mar 20 21:15:13 2015 +0100

    reproducible: dont cleanup the top-level artifacts directory
---
 bin/reproducible_maintainance.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_maintainance.sh b/bin/reproducible_maintainance.sh
index 97e588d..2a8ee1e 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
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list