diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-05-17 14:17:12 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-05-17 14:17:12 +0200 |
commit | 7d41664cb8debacdc4d84196a1f021c4bcce07a2 (patch) | |
tree | a7a11d62600017e3193155d6dd670bc73656d6c5 /bin | |
parent | 9d05eaaf17ada447446ad335e1e7d05bf13560de (diff) | |
download | jenkins.debian.net-7d41664cb8debacdc4d84196a1f021c4bcce07a2.tar.xz |
reproducible debian: remove '.debian.net' from nodenames on package test history pages
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_html_packages.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py index ed58b055..ce01db6d 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 |