[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: disable mail+irc notifications for testing

Holger Levsen holger at moszumanska.debian.org
Mon Oct 12 06:34:18 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 c64d04b3793124d876473b9a35d8673dcd50d61d
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Oct 12 08:33:33 2015 +0200

    reproducible: disable mail+irc notifications for testing
---
 bin/reproducible_build.sh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 4df70de..c72c0f7 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -96,9 +96,10 @@ update_db_and_html() {
 		VERSION="None"
 	fi
 	local OLD_STATUS=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT status FROM results WHERE package_id='${SRCPKGID}'")
-	# notification for changing status
-	if [ "${OLD_STATUS}" = "reproducible" ] && [ "$STATUS" != "depwait" ] ; then
-		if [ "$STATUS" = "unreproducible" ] || ( [ "$STATUS" = "FTBFS" ] && [ "$SUITE" = "testing" ] ) ; then
+	# irc+mail notifications for changing status in unstable and experimental
+	if [ "$SUITE" != "testing" ] ; then
+		if [ "${OLD_STATUS}" = "reproducible" ] && [ "$STATUS" != "depwait" ] && \
+		  ( [ "$STATUS" = "unreproducible" ] || [ "$STATUS" = "FTBFS" ] ) ; then
 			MESSAGE="${REPRODUCIBLE_URL}/${SUITE}/${ARCH}/${SRCPACKAGE} : reproducible ➤ ${STATUS}"
 			echo "\n$MESSAGE" | tee -a ${RBUILDLOG}
 			irc_message "$MESSAGE"
@@ -107,14 +108,13 @@ update_db_and_html() {
 				NOTIFY=""
 			fi
 		fi
-	fi
-	if [ "$SUITE" != "testing" ] && \
-			[ "$OLD_STATUS" != "$STATUS" ] && [ "$NOTIFY_MAINTAINER" -eq 1 ] && \
-			[ "$OLD_STATUS" != "depwait" ] && [ "$STATUS" != "depwait" ] && \
-			[ "$OLD_STATUS" != "404" ] && [ "$STATUS" != "404" ]; then
-		# spool notifications and mail them once a day
-		mkdir -p /srv/reproducible-results/notification-emails
-		echo "$(date -u +'%Y-%m-%d %H:%M') $REPRODUCIBLE_URL/$SUITE/$ARCH/$SRCPACKAGE changed from $OLD_STATUS -> $STATUS" >> /srv/reproducible-results/notification-emails/$SRCPACKAGE
+		if [ "$OLD_STATUS" != "$STATUS" ] && [ "$NOTIFY_MAINTAINER" -eq 1 ] && \
+		  [ "$OLD_STATUS" != "depwait" ] && [ "$STATUS" != "depwait" ] && \
+		  [ "$OLD_STATUS" != "404" ] && [ "$STATUS" != "404" ]; then
+			# spool notifications and mail them once a day
+			mkdir -p /srv/reproducible-results/notification-emails
+			echo "$(date -u +'%Y-%m-%d %H:%M') $REPRODUCIBLE_URL/$SUITE/$ARCH/$SRCPACKAGE changed from $OLD_STATUS -> $STATUS" >> /srv/reproducible-results/notification-emails/$SRCPACKAGE
+		fi
 	fi
 	sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration, builder) VALUES ('$SRCPKGID', '$VERSION', '$STATUS', '$DATE', '$DURATION', '$BUILDER')"
 	if [ ! -z "$DURATION" ] ; then  # this happens when not 404 and not_for_us

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