[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible debian: remove '.debian.net' from nodenames on package test history pages

Holger Levsen holger at layer-acht.org
Tue May 17 12:17:55 UTC 2016


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 7d41664cb8debacdc4d84196a1f021c4bcce07a2
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue May 17 14:17:12 2016 +0200

    reproducible debian: remove '.debian.net' from nodenames on package test history pages
---
 bin/reproducible_html_packages.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index ed58b05..ce01db6 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -197,6 +197,10 @@ def gen_suites_links(package, current_suite, current_arch):
     html += '</ul>\n'
     return tab*5 + (tab*7).join(html.splitlines(True))
 
+def shorten_if_debiannet(hostname):
+    if hostname[-11:] == '.debian.net':
+        hostname = hostname[:-11]
+    return hostname
 
 def gen_history_page(package):
     keys = ('build date', 'version', 'suite', 'architecture', 'result',
@@ -211,6 +215,9 @@ def gen_history_page(package):
             html += '<th>{}</th>'.format(i)
         html += '\n{tab}</tr>'.format(tab=tab)
         for record in package.history:
+            # remove trailing .debian.net from hostnames
+            record['node1'] = shorten_if_debiannet(record['node1'])
+            record['node2'] = shorten_if_debiannet(record['node2'])
             # add icon to result
             status, icon, spokenstatus = get_status_icon(record['result'])
             result_html = '<img src="/static/{icon}" alt="{spokenstatus}" title="{spokenstatus}"/> ' + spokenstatus

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