[Git][qa/jenkins.debian.net][master] refactoring: split reproducible_html_live_status into that and...
Holger Levsen (@holger)
gitlab at salsa.debian.org
Sat Mar 23 12:42:43 GMT 2024
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
fe098a26 by Holger Levsen at 2024-03-23T13:42:22+01:00
refactoring: split reproducible_html_live_status into that and _html_arch_oldies and run the later only twice a day
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- bin/reproducible_html_live_status.py
- job-cfg/reproducible.yaml
Changes:
=====================================
bin/reproducible_html_live_status.py
=====================================
@@ -13,7 +13,7 @@ from sqlalchemy import select, func, cast, Integer, and_, bindparam
from rblib import query_db, db_table
from rblib.confparse import log
-from rblib.models import Package, Status
+from rblib.models import Package
from rblib.utils import convert_into_hms_string
from rblib.html import tab, create_main_navigation, write_html_page, convert_into_status_html
from reproducible_html_indexes import build_leading_text_section
@@ -155,58 +155,7 @@ 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 = ''
- # reorder suites, to list experimental first
- reordered_suites = SUITES
- reordered_suites.insert(0, reordered_suites.pop())
- for suite in reordered_suites:
- 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)
- write_html_page(title=title, body=html, destfile=destfile, style_note=True,
- refresh_every=60, left_nav_html=left_nav_html)
- log.info("Page generated at " + desturl)
if __name__ == '__main__':
for arch in ARCHS:
generate_schedule(arch)
- generate_oldies(arch)
=====================================
job-cfg/reproducible.yaml
=====================================
@@ -540,9 +540,13 @@
my_description: 'rsync HTML pages for stats about .buildinfo from ionos7 to jenkins.'
my_timed: ''
- 'html_live_status':
- my_description: 'Generate an HTML page showing the live status of all builds happening or scheduled by humans.'
+ my_description: 'Generate HTML pages for each arch showing the live status of all builds happening or scheduled by humans.'
my_timed: 'H/15 * * * *'
my_shellext: ".py"
+ - 'html_arch_oldies':
+ my_description: 'Generate HTML pages for each arch showing the oldest package builds per suite.'
+ my_timed: '52 H/12 * * *'
+ my_shellext: ".py"
- 'html_nodes_info':
my_description: 'Generate static HTML pages with various information about nodes and jenkins jobs.'
my_timed: '15 */3 * * *'
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/fe098a2616cf4b32f3f27ffbafdd2edbefef9f87
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/fe098a2616cf4b32f3f27ffbafdd2edbefef9f87
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/20240323/6101477b/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list