[Qa-jenkins-scm] [jenkins.debian.net] 08/08: reproducible: packages: add a cool red flag for packages with notification enabled
Holger Levsen
holger at moszumanska.debian.org
Fri May 29 14:25:24 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 d4557e599137f217fdbd1b816226f9dd5772e698
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Fri May 29 16:22:50 2015 +0200
reproducible: packages: add a cool red flag for packages with notification enabled
---
bin/reproducible_html_packages.py | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index acf769d..2da881d 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -35,6 +35,9 @@ $links
${suites_links}
</td>
<td style="text-align:right; font-size:0.9em;">
+ <span class="red" title="Notifications for this packages are enabled. Every status change reproducibly-wise will be emailed to the maintainer">
+ $notify_maintainer
+ </span>
<a href="%s" target="_parent">
reproducible builds
</a>
@@ -65,18 +68,19 @@ def check_package_status(package, suite, nocheck=False):
version of the package built by jenkins CI
"""
try:
- query = ('SELECT r.status, r.version, r.build_date ' +
+ query = ('SELECT r.status, r.version, r.build_date, s.notify_maintainer ' +
'FROM results AS r JOIN sources AS s ON r.package_id=s.id ' +
'WHERE s.name="{pkg}" ' +
'AND s.suite="{suite}"').format(pkg=package, suite=suite)
result = query_db(query)[0]
except IndexError:
- query = 'SELECT version FROM sources WHERE name="{pkg}" AND suite="{suite}"'
+ query = 'SELECT version, notify_maintainer ' + \
+ 'FROM sources WHERE name="{pkg}" AND suite="{suite}"'
query = query.format(pkg=package, suite=suite)
try:
- result = query_db(query)[0][0]
+ result = query_db(query)[0]
if result:
- result = ('untested', str(result), False)
+ result = ('untested', str(result[0]), False, result[1])
except IndexError:
if nocheck:
return False
@@ -86,11 +90,12 @@ def check_package_status(package, suite, nocheck=False):
raise
status = str(result[0])
version = str(result[1])
+ notify_maint = u'\u2691' if int(result[3]) == 1 else '' # that's ⚑
if result[2]:
build_date = 'at ' + str(result[2]) + ' UTC'
else:
build_date = '<span style="color:red;font-weight:bold;">UNTESTED</span>'
- return (status, version, build_date)
+ return (status, version, build_date, notify_maint)
def gen_status_link_icon(status, icon, suite, arch):
@@ -214,7 +219,8 @@ def gen_packages_html(packages, suite=None, arch=None, no_clean=False, nocheck=F
for pkg in sorted(packages):
pkg = str(pkg)
try:
- status, version, build_date = check_package_status(pkg, suite, nocheck)
+ pkgstatus = check_package_status(pkg, suite, nocheck)
+ status, version, build_date, notify_maint = pkgstatus
except TypeError: # the package is not in the checked suite
continue
log.debug('Generating the page of ' + pkg + '/' + suite + '@' + version +
@@ -231,6 +237,7 @@ def gen_packages_html(packages, suite=None, arch=None, no_clean=False, nocheck=F
version=version,
build_time=build_date,
links=links,
+ notify_maintainer=notify_maint,
suites_links=suites_links,
default_view=default_view)
destfile = RB_PKG_PATH + '/' + suite + '/' + arch + '/' + pkg + '.html'
--
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