summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-08-11 12:52:04 +0000
committerHolger Levsen <holger@layer-acht.org>2015-08-15 12:33:47 +0200
commitf3d91fdeddf34b2ec9196b6fa31c2b11defa2760 (patch)
tree740c8f0770e8138f31a100f57a9a2323918be637
parent51ef0adaa99bd3fba96f9bef74065e9dc778c191 (diff)
downloadjenkins.debian.net-f3d91fdeddf34b2ec9196b6fa31c2b11defa2760.tar.xz
reproducible: maintenance: also consider architecture while grepping for failed build to reschedule
-rwxr-xr-xbin/reproducible_common.sh1
-rwxr-xr-xbin/reproducible_maintenance.sh22
2 files changed, 14 insertions, 9 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 933c3e44..64854c4f 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 8ccf4459..dd935b3e 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -1,6 +1,7 @@
#!/bin/bash
# Copyright 2014-2015 Holger Levsen <holger@layer-acht.org>
+# © 2015 Mattia Rizzolo <mattia@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