[Qa-jenkins-scm] [jenkins.debian.net] 02/05: reproducible: create scheduled indexes as part of the live_status job (and 'ignore bugs')
Holger Levsen
holger at moszumanska.debian.org
Thu Sep 10 23:28:42 UTC 2015
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 8fdc9f19f8338c90d9bb73732f97e8ff1bf1bd6d
Author: Holger Levsen <holger at layer-acht.org>
Date: Fri Sep 11 01:11:18 2015 +0200
reproducible: create scheduled indexes as part of the live_status job (and 'ignore bugs')
---
bin/reproducible_html_indexes.py | 28 ----------------------------
bin/reproducible_html_live_status.py | 33 ++++++++++++++++++++++++++++++++-
bin/reproducible_remote_scheduler.py | 2 +-
bin/reproducible_scheduler.py | 2 +-
4 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py
index 29c8669..d5a8aeb 100755
--- a/bin/reproducible_html_indexes.py
+++ b/bin/reproducible_html_indexes.py
@@ -535,38 +535,10 @@ def build_page(page, suite=None, arch=None):
log.info('"' + title + '" now available at ' + desturl)
-def generate_schedule(arch):
- """ the schedule pages are very different than others index pages """
- log.info('Building the schedule index page for ' + arch + '...')
- title = 'Packages currently scheduled on ' + arch + ' for testing for build reproducibility'
- query = 'SELECT sch.date_scheduled, s.suite, s.architecture, s.name ' + \
- 'FROM schedule AS sch JOIN sources AS s ON sch.package_id=s.id ' + \
- 'WHERE sch.date_build_started = "" AND s.architecture="{arch}" ORDER BY sch.date_scheduled'
- text = Template('$tot packages are currently scheduled for testing on $arch:')
- html = ''
- rows = query_db(query.format(arch=arch))
- html += build_leading_text_section({'text': text}, rows, defaultsuite, arch)
- html += '<p><table class="scheduled">\n' + tab
- html += '<tr><th>#</th><th>scheduled at</th><th>suite</th>'
- html += '<th>architecture</th><th>source package</th></tr>\n'
- for row in rows:
- # 0: date_scheduled, 1: suite, 2: arch, 3: pkg name
- pkg = row[3]
- html += tab + '<tr><td> </td><td>' + row[0] + '</td>'
- html += '<td>' + row[1] + '</td><td>' + row[2] + '</td><td><code>'
- html += link_package(pkg, row[1], row[2], bugs)
- html += '</code></td></tr>\n'
- html += '</table></p>\n'
- destfile = BASE + '/index_' + arch + '_scheduled.html'
- desturl = REPRODUCIBLE_URL + '/index_' + arch + '_scheduled.html'
- write_html_page(title=title, body=html, destfile=destfile, style_note=True)
-
-
bugs = get_bugs()
if __name__ == '__main__':
for arch in ARCHS:
- generate_schedule(arch)
for suite in SUITES:
if arch == 'armhf' and suite != 'unstable':
continue
diff --git a/bin/reproducible_html_live_status.py b/bin/reproducible_html_live_status.py
index 434c409..98bf3b2 100755
--- a/bin/reproducible_html_live_status.py
+++ b/bin/reproducible_html_live_status.py
@@ -9,6 +9,35 @@
#
from reproducible_common import *
+from reproducible_html_indexes import build_leading_text_section
+
+def generate_schedule(arch):
+ """ the schedule pages are very different than others index pages """
+ log.info('Building the schedule index page for ' + arch + '...')
+ title = 'Packages currently scheduled on ' + arch + ' for testing for build reproducibility'
+ query = 'SELECT sch.date_scheduled, s.suite, s.architecture, s.name ' + \
+ 'FROM schedule AS sch JOIN sources AS s ON sch.package_id=s.id ' + \
+ 'WHERE sch.date_build_started = "" AND s.architecture="{arch}" ORDER BY sch.date_scheduled'
+ text = Template('$tot packages are currently scheduled for testing on $arch:')
+ html = ''
+ rows = query_db(query.format(arch=arch))
+ html += build_leading_text_section({'text': text}, rows, defaultsuite, arch)
+ html += '<p><table class="scheduled">\n' + tab
+ html += '<tr><th>#</th><th>scheduled at</th><th>suite</th>'
+ html += '<th>architecture</th><th>source package</th></tr>\n'
+ for row in rows:
+ # 0: date_scheduled, 1: suite, 2: arch, 3: pkg name
+ pkg = row[3]
+ html += tab + '<tr><td> </td><td>' + row[0] + '</td>'
+ html += '<td>' + row[1] + '</td><td>' + row[2] + '</td><td><code>'
+ html += link_package(pkg, row[1], row[2], bugs)
+ html += '</code></td></tr>\n'
+ html += '</table></p>\n'
+ destfile = BASE + '/index_' + arch + '_scheduled.html'
+ desturl = REPRODUCIBLE_URL + '/index_' + arch + '_scheduled.html'
+ write_html_page(title=title, body=html, destfile=destfile)
+ log.info("Page generated at " + desturl)
+
def generate_live_status():
""" the schedule pages are very different than others index pages """
@@ -44,8 +73,10 @@ def generate_live_status():
destfile = BASE + '/live_status.html'
desturl = REPRODUCIBLE_URL + '/live_status.html'
write_html_page(title=title, body=html, destfile=destfile)
- log.info("Package page generated at " + desturl)
+ log.info("Page generated at " + desturl)
if __name__ == '__main__':
generate_live_status()
+ for arch in ARCHS:
+ generate_schedule(arch)
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index 28e58b3..115afa9 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -54,7 +54,7 @@ if scheduling_args.null:
# these are here as an hack to be able to parse the command line
from reproducible_common import *
-from reproducible_html_indexes import generate_schedule
+from reproducible_html_live_status import generate_schedule
# this variable is expected to come from the remote host
try:
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py
index dc4e947..6b1d7c3 100755
--- a/bin/reproducible_scheduler.py
+++ b/bin/reproducible_scheduler.py
@@ -22,7 +22,7 @@ from apt_pkg import version_compare
from urllib.request import urlopen
from reproducible_common import *
-from reproducible_html_indexes import generate_schedule
+from reproducible_html_live_status import generate_schedule
from reproducible_html_packages import gen_packages_html
from reproducible_html_packages import purge_old_pages
--
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