[Git][qa/jenkins.debian.net][master] 2 commits: reproducible Debian oldest packages html: refactoring
Holger Levsen (@holger)
gitlab at salsa.debian.org
Sun Oct 22 17:38:18 BST 2023
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
cc1f8ede by Holger Levsen at 2023-10-22T18:20:16+02:00
reproducible Debian oldest packages html: refactoring
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
7a5f3bec by Holger Levsen at 2023-10-22T18:37:57+02:00
reproducible Debian: stop calling released suites old
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- bin/reproducible_html_dashboard.sh
- bin/reproducible_html_live_status.py
Changes:
=====================================
bin/reproducible_html_dashboard.sh
=====================================
@@ -671,7 +671,7 @@ create_dashboard_page() {
write_global_graph
done
write_page "</p><p style=\"clear:both;\">"
- write_page "<a href=\"index_performance.html\">Build network performance stats</a> and an <a href=\"index_oldsuites.html\">overview about older suites</a> are also available."
+ write_page "<a href=\"index_performance.html\">Build network performance stats</a> and an <a href=\"index_oldsuites.html\">overview about released suites</a> are also available."
write_page "</p>"
# the end
write_page_footer
@@ -680,14 +680,14 @@ create_dashboard_page() {
}
#
-# create oldsuites page
+# create oldsuites (=released suites) page
#
create_oldsuites_page() {
VIEW=oldsuites
PAGE=index_${VIEW}.html
ARCH="amd64"
echo "$(date -u) - starting to write $PAGE page."
- write_page_header $VIEW "Overview of old suites"
+ write_page_header $VIEW "Overview of released suites"
for SUITE in ${RELEASED_SUITES} ; do
write_suite_arch_table $SUITE
for ARCH in ${ARCHS} ; do
@@ -790,13 +790,13 @@ create_performance_page() {
write_page "</p><p style=\"clear:both;\">"
done
# the end
- write_page "Build network performance stats for the old suites are available as <a href=\"index_oldsuites.html\">part of the old suites overview.</a><br />"
- write_page "Daily <a href=\"https://jenkins.debian.net/view/reproducible/job/reproducible_nodes_info/lastBuild/console\">individual build node performance stats</a> are available as well as oldest results for "
+ write_page "Oldest package tests results for "
for ARCH in ${ARCHS} ; do
comma_comma_and ${ARCH}
write_page "<a href=\"/debian/index_${ARCH}_oldies.html\">$ARCH</a>$COMMA_VAR"
done
- write_page "for all suites.</p>"
+ write_page "for all suites as well <a href=\"https://jenkins.debian.net/view/reproducible/job/reproducible_nodes_info/lastBuild/console\">individual build node performance stats</a> are available."
+ write_page "Build network performance stats for the released suites are available as <a href=\"index_oldsuites.html\">part of the released suites overview.</a><br />"
write_page_footer
publish_page debian
}
@@ -830,7 +830,7 @@ for ARCH in ${ARCHS} ; do
update_suite_arch_stats
update_buildinfo_stats
gather_suite_arch_stats
- # old suites are only updated every 12h
+ # released suites are only updated every 12h
for s in ${RELEASED_SUITES} ; do
if [ "$SUITE" = "$s" ] && [[ $(($(date +%k) % 12)) -ne 0 ]]; then
continue 2
=====================================
bin/reproducible_html_live_status.py
=====================================
@@ -1,7 +1,7 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
-# Copyright © 2015-2019 Holger Levsen <holger at layer-acht.org>
+# Copyright © 2015-2023 Holger Levsen <holger at layer-acht.org>
# © 2018 Mattia Rizzolo <mattia at mapreri.org>
# based on ~jenkins.d.n:~mattia/status.sh by Mattia Rizzolo <mattia at mapreri.org>
# Licensed under GPL-2
@@ -162,42 +162,47 @@ def generate_live_status_table(arch):
html += '</table></p>\n'
return html
+def gen_suitearch_oldies_table(suite, arch):
+ html = ''
+ query = select([
+ sources.c.suite,
+ sources.c.architecture,
+ sources.c.name,
+ results.c.status,
+ results.c.build_date
+ ]).select_from(
+ results.join(sources)
+ ).where(
+ and_(
+ sources.c.suite == bindparam('suite'),
+ sources.c.architecture == bindparam('arch'),
+ results.c.status != 'blacklisted'
+ )
+ ).order_by(
+ results.c.build_date
+ ).limit(15)
+ text = Template('Oldest results for $suite/$arch:')
+ rows = query_db(query.params({'arch': arch, 'suite': suite}))
+ html += build_leading_text_section({'text': text}, rows, suite, arch)
+ html += '<p><table class="scheduled">\n' + tab
+ html += '<tr><th class="center">#</th><th class="center">suite</th><th class="center">arch</th>'
+ html += '<th class="center">source package</th><th class="center">status</th><th class="center">build date</th></tr>\n'
+ for row in rows:
+ # 0: suite, 1: arch, 2: pkg name 3: status 4: build date
+ pkg = row[2]
+ html += tab + '<tr><td> </td><td>' + row[0] + '</td>'
+ html += '<td>' + row[1] + '</td><td><code>'
+ html += Package(pkg).html_link(row[0], row[1])
+ html += '</code></td><td>'+convert_into_status_html(str(row[3]))+'</td><td>' + str(row[4]) + '</td></tr>\n'
+ html += '</table></p>\n'
+ return html
+
def generate_oldies(arch):
log.info('Building the oldies page for ' + arch + '...')
title = 'Oldest results for ' + arch
html = ''
for suite in SUITES:
- query = select([
- sources.c.suite,
- sources.c.architecture,
- sources.c.name,
- results.c.status,
- results.c.build_date
- ]).select_from(
- results.join(sources)
- ).where(
- and_(
- sources.c.suite == bindparam('suite'),
- sources.c.architecture == bindparam('arch'),
- results.c.status != 'blacklisted'
- )
- ).order_by(
- results.c.build_date
- ).limit(15)
- text = Template('Oldest results for $suite/$arch:')
- rows = query_db(query.params({'arch': arch, 'suite': suite}))
- html += build_leading_text_section({'text': text}, rows, suite, arch)
- html += '<p><table class="scheduled">\n' + tab
- html += '<tr><th class="center">#</th><th class="center">suite</th><th class="center">arch</th>'
- html += '<th class="center">source package</th><th class="center">status</th><th class="center">build date</th></tr>\n'
- for row in rows:
- # 0: suite, 1: arch, 2: pkg name 3: status 4: build date
- pkg = row[2]
- html += tab + '<tr><td> </td><td>' + row[0] + '</td>'
- html += '<td>' + row[1] + '</td><td><code>'
- html += Package(pkg).html_link(row[0], row[1])
- html += '</code></td><td>'+convert_into_status_html(str(row[3]))+'</td><td>' + str(row[4]) + '</td></tr>\n'
- html += '</table></p>\n'
+ html += gen_suitearch_oldies_table(suite, arch):
destfile = DISTRO_BASE + '/index_' + arch + '_oldies.html'
desturl = DISTRO_URL + '/index_' + arch + '_oldies.html'
left_nav_html = create_main_navigation(arch=arch)
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/db72c0b342c2ec2e9ba0bd4757627776d7aab9f9...7a5f3becf56bbfcab3692cf36ec7adfb12d44e89
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/db72c0b342c2ec2e9ba0bd4757627776d7aab9f9...7a5f3becf56bbfcab3692cf36ec7adfb12d44e89
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20231022/50d26ad4/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list