summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-19 17:02:47 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-19 17:02:47 +0200
commit235ec73ab1126ca9afcebb4ada6faf20e2c73911 (patch)
treea8f42481bad606797930043df4eed621c34156ed
parent9cf9b2a60b9a30c23fb08c28886a496cfd032ea9 (diff)
downloadjenkins.debian.net-235ec73ab1126ca9afcebb4ada6faf20e2c73911.tar.xz
reproducible: inform about aborted or otherwise hanging builds
-rwxr-xr-xbin/reproducible_housekeeping.sh28
-rw-r--r--logparse/reproducible.rules2
2 files changed, 30 insertions, 0 deletions
diff --git a/bin/reproducible_housekeeping.sh b/bin/reproducible_housekeeping.sh
index 99efc280..8abcb6d6 100755
--- a/bin/reproducible_housekeeping.sh
+++ b/bin/reproducible_housekeeping.sh
@@ -11,6 +11,7 @@ common_init "$@"
# common
set +x
+set -e
REP_RESULTS=/srv/reproducible-results
# prepare backup
@@ -71,3 +72,30 @@ if [ -s $RESULT ] ; then
fi
rm $HAYSTACK $RESULT
+# find packages which build didnt end correctly
+QUERY="
+ SELECT * FROM sources_scheduled
+ WHERE date_scheduled != ''
+ AND date_build_started != ''
+ AND date_build_started < datetime('now', '-1 day')
+ ORDER BY date_scheduled
+ "
+PACKAGES=$(mktemp)
+sqlite3 -init $INIT ${PACKAGES_DB} "$QUERY" > $PACKAGES
+if [ -s $PACKAGES ] ; then
+ echo
+ echo "Warning: packages found where the build was started more than 24h ago:"
+ echo "name|date_scheduled|date_build_started"
+ echo
+ cat $PACKAGES
+ echo
+ echo "To fix:"
+ echo
+ for PKG in $(cat $PACKAGES | cut -d "|" -f1) ; do
+ echo " sqlite3 ${PACKAGES_DB} \"DELETE FROM sources_scheduled WHERE name = '$PKG';\""
+ done
+ echo
+fi
+rm $PACKAGES
+
+exit 0
diff --git a/logparse/reproducible.rules b/logparse/reproducible.rules
index 742a6c33..581e029a 100644
--- a/logparse/reproducible.rules
+++ b/logparse/reproducible.rules
@@ -7,3 +7,5 @@ warning /Warning: .+ contains invalid yaml, please fix./
warning /Warning: old temp directories found in .+/
warning /Warning: lock .+ still exists, exiting./
warning /Warning: processes found which should not be there/
+warning /Warning: packages found where the build was started more than 24h ago/
+