[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 3 commits: reproducible debian: build.sh: take the automatic artifacts notifications back to #-changes

Mattia Rizzolo gitlab at salsa.debian.org
Fri Jun 22 13:35:56 BST 2018


Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
0b123b98 by Mattia Rizzolo at 2018-06-22T14:16:35+02:00
reproducible debian: build.sh: take the automatic artifacts notifications back to #-changes

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
f874effd by Mattia Rizzolo at 2018-06-22T14:32:13+02:00
rblib.models: take the _status namedtuple out of the Status enum

mostly this is so it's possible to list(Status) and not get that _status
namedtuple in the results.

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
f6dfd246 by Mattia Rizzolo at 2018-06-22T14:35:42+02:00
reproducible: _html_notes: list packages in all status in the issues pages

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


3 changed files:

- bin/rblib/models.py
- bin/reproducible_build.sh
- bin/reproducible_html_notes.py


Changes:

=====================================
bin/rblib/models.py
=====================================
--- a/bin/rblib/models.py
+++ b/bin/rblib/models.py
@@ -41,6 +41,9 @@ def lazyproperty(fn):
     return _lazy
 
 
+_status = namedtuple('Status', 'name, spokenstatus, icon')
+
+
 class Status(Enum):
     """
     Values of the tuple:
@@ -48,7 +51,6 @@ class Status(Enum):
     spokenstatus: to be used in human-oriented strings
     icon: file name of the icon representing the status
     """
-    _status = namedtuple('Status', 'name, spokenstatus, icon')
     REPRODUCIBLE = _status('reproducible', 'reproducible', 'weather-clear.png')
     FTBFS = _status('FTBFS', 'FTBFS', 'weather-storm.png')
     FTBR = _status('FTBR', 'unreproducible', 'weather-showers-scattered.png')


=====================================
bin/reproducible_build.sh
=====================================
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -95,7 +95,8 @@ save_artifacts() {
 		# irc message
 		if [ ! -z "$NOTIFY" ] ; then
 			local MESSAGE="Artifacts for ${SRCPACKAGE}, $STATUS in ${SUITE}/${ARCH}: $URL"
-			if [ "$NOTIFY" = "diffoscope" ] ; then
+			if [ "$NOTIFY" = "diffoscope_err" ] ; then
+				irc_message debian-reproducible-changes "$DEBIAN_URL/$SUITE/$ARCH/$SRCPACKAGE $STATUS and $DIFFOSCOPE failed"
 				irc_message debian-reproducible-changes "$MESSAGE (error running $DIFFOSCOPE)"
 				MESSAGE="$MESSAGE (error running $DIFFOSCOPE)"
 			else
@@ -109,14 +110,11 @@ notification() {
 	if [ "$SAVE_ARTIFACTS" = "1" ] ; then
 		save_artifacts  # this will also notify IRC as needed
 	else
-		case "$NOTIFY" in
+		case "$NOTIFY" in  # the diffoscope_err case is handled by save_artifacts()
 			''|0) ;;
 			1|2)
 				irc_message debian-reproducible "$DEBIAN_URL/$SUITE/$ARCH/$SRCPACKAGE done: $STATUS"
 				;;
-			diffoscope_err)
-				irc_message debian-reproducible-changes "$DEBIAN_URL/$SUITE/$ARCH/$SRCPACKAGE $STATUS and $DIFFOSCOPE failed"
-				;;
 			diffoscope_timeout)
 				irc_message debian-reproducible-changes "$DEBIAN_URL/$SUITE/$ARCH/$SRCPACKAGE $STATUS and $DIFFOSCOPE timed out"
 				;;


=====================================
bin/reproducible_html_notes.py
=====================================
--- a/bin/reproducible_html_notes.py
+++ b/bin/reproducible_html_notes.py
@@ -314,17 +314,18 @@ def gen_html_issue(issue, suite):
     )
     try:
         arch = 'amd64'
-        for status in ['FTBR', 'FTBFS', 'NFU', 'blacklisted', 'reproducible', 'depwait']:
+        for status in Status:
+            status = status.value
             pkgs = query_db(sql.where(sources.c.name.in_(issues_count[issue]))\
-                   .params({'suite': suite, 'arch': arch, 'status': status}))
+                .params({'suite': suite, 'arch': arch, 'status': status.name}))
             pkgs = [p[0] for p in pkgs]
             if not pkgs:
                 continue
             affected += tab*4 + '<p>\n'
-            icon = Status.get(status).value.icon
-            affected += tab*5 + '<img src="/static/{}"'.format(icon)
-            affected += ' alt="' + status + ' icon" />\n'
-            affected += tab*5 + str(len(pkgs)) + ' ' + status + ' packages in ' + suite + '/' + arch +':\n'
+            affected += tab*5 + '<img src="/static/{}"'.format(status.icon)
+            affected += ' alt="' + status.name + ' icon" />\n'
+            affected += tab*5 + str(len(pkgs)) + ' ' + status.spokenstatus
+            affected += ' packages in ' + suite + '/' + arch +':\n'
             affected += tab*5 + '<code>\n'
             pkgs_popcon = issues_popcon_annotate(pkgs)
             try:



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/42decf0c33f5f3f92cf9ff2af0c4a5cdc177aba3...f6dfd246ee5835c2e4620eb51f7198148b916844

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/42decf0c33f5f3f92cf9ff2af0c4a5cdc177aba3...f6dfd246ee5835c2e4620eb51f7198148b916844
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/20180622/1f0439b2/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list