[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Debian: be more careful when deleting 'recent' console.logs...

Holger Levsen gitlab at salsa.debian.org
Mon Jul 30 08:38:27 BST 2018


Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
a1573216 by Holger Levsen at 2018-07-30T07:38:09Z
reproducible Debian: be more careful when deleting 'recent' console.logs...

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_maintenance.sh


Changes:

=====================================
bin/reproducible_maintenance.sh
=====================================
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -202,7 +202,10 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then
 			echo
 			echo "Old logfiles cleaned in /var/lib/jenkins/userContent/reproducible/debian/build_service/"
 			echo -n "$OLDSTUFF"
-			find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +0 -exec rm -rf --one-file-system {} \; || true
+			# we make sure to actually only delete console.log.gz older than a day
+			# other stuff we only delete after two days (in case a build is running more than 24h...)
+			find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +0 -name console.log.gz -exec rm -rf --one-file-system {} \; || true
+			find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +1 -exec rm -rf --one-file-system {} \; || true
 			echo
 		fi
 	fi



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/a1573216ba4199a8ac853b0aed0d1cdbddeb52d0

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/a1573216ba4199a8ac853b0aed0d1cdbddeb52d0
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20180730/fad9b04a/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list