[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible OpenWrt: cleanup old build chroots older than 3 days

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Jun 22 19:25:09 BST 2023



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


Commits:
e7edca88 by Holger Levsen at 2023-06-22T20:24:51+02:00
reproducible OpenWrt: cleanup old build chroots older than 3 days

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

- - - - -


1 changed file:

- bin/reproducible_maintenance.sh


Changes:

=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -120,19 +120,30 @@ fi
 
 
 #
-# delete old chroot-installation directories (not related to reproducible builds)
+# delete old chroot directories
 #
 if [ -d /srv/workspace/chroots/ ] ; then
-	echo "$(date -u) - Deleting chroots build directories, older than 7 days."
+	echo "$(date -u) - Looking for chroot-installation jobs directories, older than 7 days."
+	# delete old chroot-installation directories (not related to reproducible builds)
 	OLDSTUFF=$(find /srv/workspace/chroots/ -maxdepth 2 -name 'chroot-installation*' -type d -mtime +6 -exec ls -lad {} \; || true)
 	if [ -n "$OLDSTUFF" ] ; then
 		echo
-		echo "Old chroot-installation directories found in /srv/workspace/chroots/"
+		echo "Old chroot-installation directories found in /srv/workspace/chroots/, deleting them now:"
 		echo -n "$OLDSTUFF"
 		( find /srv/workspace/chroots/ -maxdepth 2 -name 'chroot-installation*' -type d -mtime +6 -exec sudo rm -rf --one-file-system {} \; ) || true
 		echo
 		DIRTY=true
 	fi
+	echo "$(date -u) - Looking for chroots used as openwrt build directories, older than 3 days."
+	OLDSTUFF=$(find /srv/workspace/chroots/ -maxdepth 2 -name 'rbuild-openwrt-build-*' -type d -mtime +2 -exec ls -lad {} \; || true)
+	if [ -n "$OLDSTUFF" ] ; then
+		echo
+		echo 'Old rbuild-openwrt-build-* directories found in /srv/workspace/chroots/, deleting them now:'
+		echo -n "$OLDSTUFF"
+		( find /srv/workspace/chroots/ -maxdepth 2 -name 'rbuild-openwrt-build-*' -type d -mtime +2 -exec sudo rm -rf --one-file-system {} \; ) || true
+		echo
+		DIRTY=true
+	fi
 fi
 
 #
@@ -713,7 +724,7 @@ if [ -s $RESULT ] ; then
 		echo
 		for PROCESS in $(cat $TOKILL) ; do
 			sudo kill -9 $PROCESS 2>&1
-			echo "'kill -9 $PROCESS' done."
+			echo "'sudo kill -9 $PROCESS' done."
 		done
 		echo
 	fi



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/e7edca88af3e32d90f58a07a3b7adaa59fe87c32
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/20230622/afdb4e93/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list