From 429299cbe09ddf3d7dc6d0862f6e325d200d6b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Mon, 12 Aug 2024 14:51:31 +0200 Subject: [PATCH 1/2] Check that generated changelog entry doesn't break docs build Since changelog entries are now generated from MR title&description, they aren't sanity checked during a regular docs build. If these contain special sequences that will be interpreted by sphinx, it might result in breakage that would have to be amended manually. Add a CI check to test a doc build with changelog after the MR is merged to ensure that the docs can be built when generating changelog from pristine git contents. (cherry picked from commit bf69e8f149d539e4a5d21638c77c1b9a2d29347d) --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e827a5223..c64bcf7b7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -660,6 +660,28 @@ tarball-create: # Jobs for doc builds on Debian 12 "bookworm" (amd64) +changelog: + <<: *base_image + <<: *docs_job + rules: + - if: '$CI_MERGE_REQUEST_TITLE =~ /\s(dev|usr|pkg):/' + variables: + GIT_AUTHOR_NAME: $GITLAB_USER_NAME + GIT_AUTHOR_EMAIL: $GITLAB_USER_EMAIL + GIT_COMMITTER_NAME: $GITLAB_USER_NAME + GIT_COMMITTER_EMAIL: $GITLAB_USER_EMAIL + before_script: + - echo -e "$CI_MERGE_REQUEST_TITLE\n" > commitmsg + - sed -i 's/^Draft:\s*//' commitmsg + - echo -e "$CI_MERGE_REQUEST_DESCRIPTION" >> commitmsg + - git commit --allow-empty -F commitmsg + - ./contrib/gitchangelog/gitchangelog.py HEAD^..HEAD + needs: + - job: autoreconf + artifacts: true + artifacts: + untracked: true + docs: <<: *default_triggering_rules <<: *base_image From 7f057b379d7b2960b054dea60731f6a0eea192cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Tue, 13 Aug 2024 14:00:43 +0200 Subject: [PATCH 2/2] Use python3 in shebang lines for util scripts Some distributions (notably, debian bookworm) have deprecated the `python` interpreter in favor of `python3`. Since our scripts are python3 anyway, use the proper numbered version in shebang to make scripts easily executable. (cherry picked from commit 480dcdef9af36283273fdd88021ee525f7a7f287) --- bin/tests/convert-trs-to-junit.py | 2 +- bin/tests/system/doth/get_openssl_version.py | 2 +- bin/tests/system/doth/stress_http_quota.py | 2 +- contrib/gitchangelog/gitchangelog.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/tests/convert-trs-to-junit.py b/bin/tests/convert-trs-to-junit.py index 85b37dd629..6d7b4aaa1b 100755 --- a/bin/tests/convert-trs-to-junit.py +++ b/bin/tests/convert-trs-to-junit.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) Internet Systems Consortium, Inc. ("ISC") # diff --git a/bin/tests/system/doth/get_openssl_version.py b/bin/tests/system/doth/get_openssl_version.py index f1d6f4bf00..94cbf5a6bc 100755 --- a/bin/tests/system/doth/get_openssl_version.py +++ b/bin/tests/system/doth/get_openssl_version.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) Internet Systems Consortium, Inc. ("ISC") # diff --git a/bin/tests/system/doth/stress_http_quota.py b/bin/tests/system/doth/stress_http_quota.py index 05ad043571..ca1fddbcc6 100755 --- a/bin/tests/system/doth/stress_http_quota.py +++ b/bin/tests/system/doth/stress_http_quota.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) Internet Systems Consortium, Inc. ("ISC") # diff --git a/contrib/gitchangelog/gitchangelog.py b/contrib/gitchangelog/gitchangelog.py index 7193dddc3d..c0d444baf1 100755 --- a/contrib/gitchangelog/gitchangelog.py +++ b/contrib/gitchangelog/gitchangelog.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################ # Copyright (c) 2018, Valentin Lab # All rights reserved.