[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible debian navigation: start reorganizing new navigation (WIP, misses most of the .sh part)
Holger Levsen
holger at layer-acht.org
Sat May 14 12:11:38 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch h01ger/WIP-new-navigation
in repository jenkins.debian.net.
commit 0b413ca7e6cdaceed89f76e8ef6dbe7635eb4795
Author: Holger Levsen <holger at layer-acht.org>
Date: Sat May 14 13:44:47 2016 +0200
reproducible debian navigation: start reorganizing new navigation (WIP, misses most of the .sh part)
---
bin/reproducible_common.py | 77 +++++++++++++++++++++++++++------------
bin/reproducible_common.sh | 23 ++++++++++--
bin/reproducible_html_packages.py | 21 ++---------
3 files changed, 76 insertions(+), 45 deletions(-)
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 0bc374a..e71eb71 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -165,11 +165,10 @@ html_footer = Template("""
</div></body>
</html>""" % (JOB_FOOTER, JENKINS_URL))
-html_head_page = Template((tab*2).join("""
+html_head_page = Template((tab*2).join(("""
<header class="head">
<h2>$page_title</h2>
<ul class=\"menu\">
-$links
<li>$suite/$arch:<ul class="children">
<li>Notes:<ul class="children">
<li><a href="/$suite/$arch/index_notes.html">packages with notes</a></li>
@@ -200,25 +199,30 @@ $links
</a>
</li>
</ul></li>
-$pkgsetslink
+ $link_pkgsets
<li>Recently tested:<ul class="children">
<li><a href="/$suite/$arch/index_last_24h.html">packages tested in the last 24h</a></li>
<li><a href="/$suite/arch/index_last_48h.html">packages tested in the last 48h</a></li>
</ul></li>
<li><a href="/$suite/$arch/index_all_abc.html">all tested packages (sorted alphabetically)</a></li>
</ul></li>
- <li><a href="/index_issues.html">issues</a></li>
- <li><a href="/index_${arch}_scheduled.html">currently scheduled</a></li>
- <li><a href="/index_notify.html" title="notify icon">⚑ packages with enabled notifications</a></li>
- <li><a href="/$suite/index_dd-list.html">maintainers of unreproducible packages</a></li>
- <li><a href="/index_repositories.html">repositories overview</a></li>
- <li><a href="/reproducible.html">dashboard</a></li>
- <li><a href="https://wiki.debian.org/ReproducibleBuilds" target="_blank">wiki</a></li>
- <li><a href="https://reproducible.alioth.debian.org/blog/" target="_blank">blog</a></li>
- <li><a href="https://Reproducible-builds.org" target="_blank">Reproducible-builds.org</a></li>
+ <li>Architectures:<ul class="children">
+ $link_archs
+ <li><a href="/index_${arch}_scheduled.html">currently scheduled</a></li>
+ </ul></li>
+ <li>Suites:<ul class="children">
+ $link_suites
+ <li><a href="/$suite/index_dd-list.html">maintainers of unreproducible packages</a></li>
+ </ul></li>
+ <li><a href="%s">Debian dashboard</a>
+ <ul class="children">
+ <li><a href="/index_issues.html">issues</a></li>
+ <li><a href="/index_repositories.html">repositories overview</a></li>
+ <li><a href="/index_notify.html" title="notify icon">⚑ packages with enabled notifications</a></li>
+ </ul></li>
</ul>
-</header><div class="mainbody">""".splitlines(True)))
-
+$project_links
+</header><div class="mainbody">""" % REPRODUCIBLE_URL ).splitlines(True)))
html_foot_page_style_note = Template((tab*2).join("""
<p style="font-size:0.9em;">
@@ -233,6 +237,24 @@ html_foot_page_style_note = Template((tab*2).join("""
indicates a closed bug. In cases of several bugs, the symbol is repeated.
</p>""".splitlines(True)))
+html_project_links = Template((tab*2).join("""
+ <ul class="reproducible-links">
+ <li>Reproducible Builds projects links
+ <ul class="children"><li>
+ <a href="https://Reproducible-builds.org">Reproducible-builds.org</a><br />
+ Reproducible-builds.org - <a href="https://Reproducible-builds.org/docs/">HowTo</a><br />
+ Reproducible Debian - <a href="https://wiki.debian.org/ReproducibleBuilds">Wiki</a><br />
+ Reproducible builds <a href="https://reproducible.alioth.debian.org/blog/">weekly news</a><br />
+ </li><li>
+ Reproducible <a href="https://tests.reproducible-builds.org/archlinux/">Arch Linux</a> /
+ <a href="https://tests.reproducible-builds.org/coreboot/">coreboot</a> /
+ <a href="https://tests.reproducible-builds.org/fedora/">Fedora</a> /
+ <a href="https://tests.reproducible-builds.org/freebsd/">FreeBSD</a> /
+ <a href="https://tests.reproducible-builds.org/netbsd/">NetBSD</a> /
+ <a href="https://tests.reproducible-builds.org/openwrt/">OpenWrt</a>
+ </li></ul></li>
+ </ul>
+""".splitlines(True)))
url2html = re.compile(r'((mailto\:|((ht|f)tps?)\://|file\:///){1}\S+)')
@@ -299,16 +321,18 @@ def convert_into_hms_string(duration):
def _gen_pkg_sets_link(suite, arch):
html = ''
if suite != 'experimental':
- html = '<li><a href="/$suite/$arch/index_pkg_sets.html">package sets</a></li>'
+ html = '<li><a href="/' + suite + '/' + arch + '/index_pkg_sets.html">package sets</a></li>'
return html
-
-def _gen_links(suite, arch):
- html = '<li>Architectures:'
+def _gen_arch_links(suite, arch):
+ html = '<li>'
for a in ARCHS:
- html += ' <a href="/$suite/index_suite_' + a + '_stats.html\">' + a + '</a>'
+ html += ' <a href="/' + suite + '/index_suite_' + a + '_stats.html\">' + a + '</a>'
html += '</li>'
- html += '<li>Suites:'
+ return html
+
+def _gen_suite_links(suite, arch):
+ html = '<li>'
for s in SUITES:
html += ' <a href="/' + s + '/index_suite_' + arch + '_stats.html">' + s + '</a>'
html += '</li>'
@@ -324,14 +348,19 @@ def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch,
page_title=title,
meta_refresh=meta_refresh)
if not noheader:
- links = _gen_links(suite, arch)
- pkgsetslink = _gen_pkg_sets_link(suite, arch)
+ link_archs = _gen_arch_links(suite, arch)
+ link_suites = _gen_suite_links(suite, arch)
+ link_pkgsets = _gen_pkg_sets_link(suite, arch)
+ project_links=html_project_links.substitute()
+
html += html_head_page.substitute(
page_title=title,
suite=suite,
arch=arch,
- links=links,
- pkgsetslink=pkgsetslink)
+ link_archs=link_archs,
+ link_suites=link_suites,
+ link_pkgsets=link_pkgsets,
+ project_links=project_links)
html += body
if style_note:
html += html_foot_page_style_note.substitute()
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index cb9eb3b..f56967d 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -199,7 +199,7 @@ write_page_header() {
SPOKENTARGET["pkg_sets"]="package sets"
SPOKENTARGET["suite_stats"]="suite: $SUITE"
SPOKENTARGET["repositories"]="repositories overview"
- SPOKENTARGET["dashboard"]="dashboard"
+ SPOKENTARGET["dashboard"]="Debian dashboard"
write_page "<!DOCTYPE html><html><head>"
write_page "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"
write_page "<meta name=\"viewport\" content=\"width=device-width\" />"
@@ -256,10 +256,25 @@ write_page_header() {
write_page "<li><a href=\"$BASEURL/index_${TARGET}.html\">${SPOKEN_TARGET}</a></li>"
fi
done
- write_page "<li><a href=\"https://wiki.debian.org/ReproducibleBuilds\" target=\"_blank\">wiki</a></li>"
- write_page "<li><a href=\"https://reproducible.alioth.debian.org/blog/\" target=\"_blank\">blog</a></li>"
- write_page "<li><a href=\"https://Reproducible-builds.org\" target=\"_blank\">Reproducible-builds.org</a></li>"
write_page "</ul>"
+ # project links
+ write_page " <ul class=\"reproducible-links\">"
+ write_page " <li>Reproducible Builds projects links"
+ write_page " <ul class=\"children\"><li>"
+ write_page " <a href=\"https://Reproducible-builds.org\">Reproducible-builds.org</a><br />"
+ write_page " Reproducible-builds.org - <a href=\"https://Reproducible-builds.org/docs/\">HowTo</a><br />"
+ write_page " Reproducible Debian - <a href=\"https://wiki.debian.org/ReproducibleBuilds\">Wiki</a><br />"
+ write_page " Reproducible builds <a href=\"https://reproducible.alioth.debian.org/blog/\">weekly news</a><br />"
+ write_page " </li><li>"
+ write_page " Reproducible <a href=\"https://tests.reproducible-builds.org/archlinux/\">Arch Linux</a> /"
+ write_page " <a href=\"https://tests.reproducible-builds.org/coreboot/\">coreboot</a> /"
+ write_page " <a href=\"https://tests.reproducible-builds.org/fedora/\">Fedora</a> /"
+ write_page " <a href=\"https://tests.reproducible-builds.org/freebsd/\">FreeBSD</a> /"
+ write_page " <a href=\"https://tests.reproducible-builds.org/netbsd/\">NetBSD</a> /"
+ write_page " <a href=\"https://tests.reproducible-builds.org/openwrt/\">OpenWrt</a>"
+ write_page " </li></ul></li>"
+ write_page " </ul>"
+ # end project links
write_page "</header>"
write_page "<div class=\"mainbody\">"
if [ "$1" = "$MAINVIEW" ] ; then
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index fc59f3e..fe64450 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -39,25 +39,10 @@ html_package_page = Template((tab*2).join(("""
<li>
<a href="$history" target="main">Test history</a>
</li>
- </ul>
-
${suites_links}
-
- <ul class="reproducible-links">
- Reproducible Builds projects links
- <li>
- tests.reproducible-builds.org - <a href="%s">Debian Dashboard</a><br />
- Reproducible Debian - <a href="https://wiki.debian.org/ReproducibleBuilds">Wiki</a><br />
- Reproducible-builds.org - <a href="https://Reproducible-builds.org/docs/">HowTo</a><br />
- <a href="https://Reproducible-builds.org">Reproducible-builds.org</a><br />
- Reproducible <a href="https://tests.reproducible-builds.org/archlinux/">Arch Linux</a> /
- <a href="https://tests.reproducible-builds.org/coreboot/">coreboot</a> /
- <a href="https://tests.reproducible-builds.org/fedora/">Fedora</a> /
- <a href="https://tests.reproducible-builds.org/freebsd/">FreeBSD</a> /
- <a href="https://tests.reproducible-builds.org/netbsd/">NetBSD</a> /
- <a href="https://tests.reproducible-builds.org/openwrt/">OpenWrt</a>
- </li>
+ <li><a href="%s">Debian dashboard</a></li></ul>
</ul>
+${project_links}
</header>
<iframe id="main" name="main" tabindex="1" src="${default_view}">
@@ -271,6 +256,7 @@ def gen_packages_html(packages, no_clean=False):
status, icon, spokenstatus = get_status_icon(status)
status = gen_status_link_icon(status, spokenstatus, icon, suite, arch)
history = '{}/{}.html'.format(HISTORY_URI, pkg)
+ project_links = html_project_links.substitute()
html = html_package_page.substitute(
package=pkg,
@@ -283,6 +269,7 @@ def gen_packages_html(packages, no_clean=False):
links=links,
notify_maintainer=package.notify_maint,
suites_links=suites_links,
+ project_links=project_links,
default_view=default_view)
destfile = RB_PKG_PATH + '/' + suite + '/' + arch + '/' + pkg + '.html'
desturl = REPRODUCIBLE_URL + RB_PKG_URI + '/' + suite + \
--
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