summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_common.py
diff options
context:
space:
mode:
authorValerie R Young <spectranaut@riseup.net>2016-06-25 06:47:18 -0400
committerHolger Levsen <holger@layer-acht.org>2016-07-05 17:24:55 +0200
commitee75142772ff7ad5a147bd4cc6aecdf6f0f13a1c (patch)
tree42c8cf521013c47c4a0b087ef1f280d3d93da5a9 /bin/reproducible_common.py
parent4205b546a2c71467f8aa4255423de24b6e086a47 (diff)
downloadjenkins.debian.net-ee75142772ff7ad5a147bd4cc6aecdf6f0f13a1c.tar.xz
reproducible debian: add template for default footer
[ Mattia Rizzolo ] wrap and indent lines in default_page_footer.mustache Signed-off-by: Mattia Rizzolo <mattia@debian.org> Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_common.py')
-rwxr-xr-xbin/reproducible_common.py29
1 files changed, 11 insertions, 18 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 8738a501..c3ea23fd 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -143,6 +143,9 @@ tab = ' '
renderer = pystache.Renderer();
status_icon_link_template = renderer.load_template(
TEMPLATE_PATH + '/status_icon_link')
+default_page_footer_template = renderer.load_template(
+ TEMPLATE_PATH + '/default_page_footer')
+
html_header = Template("""<!DOCTYPE html>
<html>
@@ -165,23 +168,12 @@ else:
JOB_FOOTER += JOB_NAME+'</a> which is configured via this '
JOB_FOOTER += '<a href="https://anonscm.debian.org/git/qa/jenkins.debian.net.git/">git repo</a>.'
-html_footer = Template("""
- <hr id="footer_separator" /><p style="font-size:0.9em;"><div id="page_footer">
- %s
- There is more information <a href="%s/userContent/about.html">about
- jenkins.debian.net</a> and about
- <a href="https://wiki.debian.org/ReproducibleBuilds"> reproducible builds
- of Debian</a> available elsewhere.
- <br /> Last update: $date.
- Copyright 2014-2016 <a href="mailto:holger@layer-acht.org">Holger Levsen</a>
- and <a href="https://jenkins.debian.net//userContent/thanks.html">many others</a>.
- The code of <a href="https://anonscm.debian.org/git/qa/jenkins.debian.net.git/">jenkins.debian.net.git</a> is mostly
- GPL-2 licensed. The weather icons are public domain and have been taken
- from the <a href=http://tango.freedesktop.org/Tango_Icon_Library target=_blank>
- Tango Icon Library</a>.
- </p>
- </div></body>
-</html>""" % (JOB_FOOTER, JENKINS_URL))
+def create_default_page_footer(date):
+ return renderer.render(default_page_footer_template, {
+ 'date': date,
+ 'job_footer': JOB_FOOTER,
+ 'jenkins_url': JENKINS_URL,
+ })
html_head_page = Template((tab*2).join(("""
<header class="head">
@@ -391,7 +383,8 @@ def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch,
if style_note:
html += html_foot_page_style_note.substitute()
if not noendpage:
- html += html_footer.substitute(date=now)
+ html += create_default_page_footer(now)
+ html += '</body>\n</html>'
else:
html += '</body>\n</html>'
try: