[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible debian: maintenance: keep the build wokder logs for an extra day

Mattia Rizzolo mattia at debian.org
Thu Apr 5 20:45:38 UTC 2018


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

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

commit df10b0d26b0cb5535d4d308418c5552af7dbcae5
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Apr 5 22:45:26 2018 +0200

    reproducible debian: maintenance: keep the build wokder logs for an extra day
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 bin/reproducible_maintenance.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index f39a835..b6669a2 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -196,25 +196,25 @@ set -e
 # delete build services logfiles
 if [ "$HOSTNAME" = "$MAINNODE" ] ; then
 	if [ -d /var/lib/jenkins/userContent/reproducible/debian/build_service/ ] ; then
-		echo "$(date -u) - Deleting logfiles from build services directories, older than a day."
-		OLDSTUFF=$(find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +0 -exec ls -lad {} \; || true)
+		echo "$(date -u) - Deleting logfiles from build services directories, older than 2 days."
+		OLDSTUFF=$(find /var/lib/jenkins/userContent/reproducible/debian/build_service/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +1 -exec ls -lad {} \; || true)
 		if [ ! -z "$OLDSTUFF" ] ; 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
+			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
 fi
 
 # remove too old schroot sessions
-echo "$(date -u) - Removing schroot sessions older than 2 days."
+echo "$(date -u) - Removing schroot sessions older than 3 days."
 dir=/var/lib/schroot/unpack/
 OLDSTUFF=$(find "$dir" -mindepth 1 -maxdepth 1 -type d -mtime +2 -exec ls -lad {} \;)
 if [ ! -z "$OLDSTUFF" ]; then
 	echo
-	echo "schroot sessions older than 2 days found, which will be deleted:"
+	echo "schroot sessions older than 3 days found, which will be deleted:"
 	echo "$OLDSTUFF"
 	echo
 	for s in $(find "$dir" -mindepth 1 -maxdepth 1 -type d -mtime +2 -print0 | xargs -0 -r basename -a); do

-- 
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