[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: use same footer for .sh and .py pages

Holger Levsen holger at moszumanska.debian.org
Thu Jan 7 13:41:49 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 af2d7673e79fe0464b05af3c6c5b91ef9847b3f0
Author: Holger Levsen <holger at layer-acht.org>
Date:   Thu Jan 7 14:41:28 2016 +0100

    reproducible: use same footer for .sh and .py pages
---
 TODO                       |  1 -
 bin/reproducible_common.py | 23 ++++++++++++++++++-----
 bin/reproducible_common.sh |  2 +-
 3 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/TODO b/TODO
index 4087a72..5334d71 100644
--- a/TODO
+++ b/TODO
@@ -141,7 +141,6 @@ The plan is to run a jenkins.d.o host, which is maintained by DSA, but we are ma
 ** reenable disorderfs setup, check that it *always* unmounts + cleans up nicely
 
 * higher prio:
-** FIXME: use same footer for .sh and .py pages…
 ** pkg pages
 *** new table in pkg/test history page: schedule - if that package is currently scheduled
 *** add link to pkg set(s) if pkg is member of some
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 52f6d09..01e5332 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -135,20 +135,33 @@ html_header = Template("""<!DOCTYPE html>
       <title>$page_title</title>
   </head>
   <body $padding>""")
+
+if os.environ['JOB_URL'] == '':
+    JOB_FOOTER=''
+else:
+    JOB_URL = os.environ['JOB_URL']
+    JOB_NAME = os.path.basename(JOB_URL[:-1])
+    JOB_FOOTER = 'This page was built by the jenkins job <a href="'+JOB_URL+'">'
+    JOB_FOOTER += JOB_NAME+'</a> which is configured via this '
+    JOB_FOOTER += '<a href="http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/">git repo</a>.'
+
 html_footer = Template("""
-    <hr />
-    <p style="font-size:0.9em;">
+      <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. Last update: $date.
-      Copyright 2014-2016 <a href="mailto:holger at layer-acht.org">Holger Levsen</a> and others,
+      of Debian</a> available elsewhere.
+      <br /> Last update: $date.
+      Copyright 2014-2016 <a href="mailto:holger at layer-acht.org">Holger Levsen</a>
+      and <a href="https://jenkins.debian.net//userContent/thanks.html">many others</a>.
+      The code of <a href="http://anonscm.debian.org/cgit/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>
   </body>
-</html>""" % (JENKINS_URL))
+</html>""" % (JOB_FOOTER, JENKINS_URL))
 
 html_head_page = Template((tab*2).join("""
 <header>
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 6bfead0..4db049d 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -333,7 +333,7 @@ write_page_footer() {
 	fi
 	write_page "There is more information <a href=\"https://jenkins.debian.net/userContent/about.html\">about jenkins.debian.net</a> and about <a href=\"https://wiki.debian.org/ReproducibleBuilds\"> reproducible builds of Debian</a> available elsewhere."
 	write_page "<br /> Last update: $(date +'%Y-%m-%d %H:%M %Z'). Copyright 2014-2016 <a href=\"mailto:holger at layer-acht.org\">Holger Levsen</a> and <a href=\"https://jenkins.debian.net//userContent/thanks.html\">many others</a>."
-	write_page "The code of <a href=\"http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/\">jenkins.debian.net.git</a> is mostly GPL2 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>."
+	write_page "The code of <a href=\"http://anonscm.debian.org/cgit/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>."
 	write_page "<br />"
 	if [ "$1" = "coreboot" ] ; then
 		write_page "The <a href=\"http://www.coreboot.org\">Coreboot</a> logo is Copyright © 2008 by Konsult Stuge and coresystems GmbH and can be freely used to refer to the Coreboot project."

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