[Qa-jenkins-scm] [jenkins.debian.net] 01/02: reproducible: maintenance: also consider architecture while grepping for failed build to reschedule

Holger Levsen holger at moszumanska.debian.org
Sat Aug 15 10:36:17 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 f3d91fdeddf34b2ec9196b6fa31c2b11defa2760
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Tue Aug 11 12:52:04 2015 +0000

    reproducible: maintenance: also consider architecture while grepping for failed build to reschedule
---
 bin/reproducible_common.sh      |  1 +
 bin/reproducible_maintenance.sh | 22 +++++++++++++---------
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 933c3e4..64854c4 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -111,6 +111,7 @@ schedule_packages() {
 		--message "$REASON" \
 		--no-notify \
 		--suite "$SUITE" \
+		--architecture "$ARCH" \
 		$@
 }
 
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 8ccf445..dd935b3 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
 
 # Copyright 2014-2015 Holger Levsen <holger at layer-acht.org>
+#         © 2015 Mattia Rizzolo <mattia at mapreri.org>
 # released under the GPLv=2
 
 DEBUG=false
@@ -82,17 +83,20 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
 		echo "$FAILED_BUILDS"
 		echo
 		echo "Rescheduling packages: "
+		REQUESTER="jenkins maintenance job"
+		REASON="maintenance reschedule: reschedule builds which failed due to network errors"
 		for SUITE in $(echo $FAILED_BUILDS | sed "s# #\n#g" | cut -d "/" -f8 | sort -u) ; do
-			REQUESTER="jenkins maintenance job"
-			REASON="maintenance reschedule: reschedule builds which failed due to network errors"
-			CANDIDATES=$(for PKG in $(echo $FAILED_BUILDS | sed "s# #\n#g" | grep "/$SUITE/" | cut -d "/" -f10 | cut -d "_" -f1) ; do echo "$PKG" ; done)
-			# double check those builds actually failed
-			TO_SCHEDULE=""
-			for pkg in $CANDIDATES ; do
-				QUERY="SELECT s.name FROM sources AS s JOIN results AS r ON r.package_id=s.id WHERE s.suite='$SUITE' AND (r.status='FTBFS' OR r.status='depwait') AND s.name='$pkg'"
-				TO_SCHEDULE=${TO_SCHEDULE:+"$TO_SCHEDULE "}$(sqlite3 -init $INIT $PACKAGES_DB "$QUERY")
+			for ARCH in $(echo $FAILED_BUILDS | sed "s# #\n#g" | cut -d "/" -f9 | sort -u) ; do
+				CANDIDATES=$(for PKG in $(echo $FAILED_BUILDS | sed "s# #\n#g" | grep "/$SUITE/$ARCH/" | cut -d "/" -f10 | cut -d "_" -f1) ; do echo "$PKG" ; done)
+				# double check those builds actually failed
+				TO_SCHEDULE=""
+				for pkg in $CANDIDATES ; do
+					QUERY="SELECT s.name FROM sources AS s JOIN results AS r ON r.package_id=s.id
+						   WHERE s.suite='$SUITE' AND s.architecture='$ARCH' AND (r.status='FTBFS' OR r.status='depwait') AND s.name='$pkg'"
+					TO_SCHEDULE=${TO_SCHEDULE:+"$TO_SCHEDULE "}$(sqlite3 -init $INIT $PACKAGES_DB "$QUERY")
+				done
+				schedule_packages $TO_SCHEDULE
 			done
-			schedule_packages $TO_SCHEDULE
 		done
 		DIRTY=true
 	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