]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check that generated changelog entry doesn't break docs build
authorNicki Křížek <nicki@isc.org>
Mon, 12 Aug 2024 12:51:31 +0000 (14:51 +0200)
committerNicki Křížek <nicki@isc.org>
Wed, 14 Aug 2024 15:43:39 +0000 (15:43 +0000)
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

index 7e827a5223497a74bd2589523da7f97890d10a04..c64bcf7b7c7e2789c133a0eea7d22e7e75515d5c 100644 (file)
@@ -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