]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ensure changelog job builds docs with the new entry
authorNicki Křížek <nicki@isc.org>
Mon, 2 Dec 2024 14:31:53 +0000 (15:31 +0100)
committerNicki Křížek <nicki@isc.org>
Fri, 24 Jan 2025 18:11:11 +0000 (18:11 +0000)
The changelog job is supposed to test that the text from GitLab MR
title&description is valid rst syntax and can be built with sphinx. In
49128fc1, the way gitchangelog generates entries was changed - it no
longer writes to the changelog file, but generates output on stdout
instead. Ensure the generated notes is actually written to (some)
rendered file which is part of the docs so that the subsequent sphinx
build attempts to render the note.

(cherry picked from commit 380a30ba8d59453a04de05ddd7ce10d840cd875a)

.gitlab-ci.yml

index a6c4584cfc2201faa39f333ee12dbc82ae7a45ba..de8005a9b406fea2843aeb9ff0c9b2b1f2018f2a 100644 (file)
@@ -468,10 +468,12 @@ stages:
       junit: junit.xml
 
 .docs: &docs_job
+  variables:
+    DOC_MAKE_TARGET: doc
   stage: docs
   script:
     - *configure
-    - make -j${BUILD_PARALLEL_JOBS:-1} -k doc V=1
+    - make -j${BUILD_PARALLEL_JOBS:-1} -k ${DOC_MAKE_TARGET} V=1
     - find doc/man/ -maxdepth 1 -name "*.[0-9]" -exec mandoc -T lint "{}" \; | ( ! grep -v -e "skipping paragraph macro. sp after" -e "unknown font, skipping request. ft C" -e "input text line longer than 80 bytes" )
 
 .respdiff: &respdiff_job
@@ -672,12 +674,15 @@ changelog:
     GIT_AUTHOR_EMAIL: $GITLAB_USER_EMAIL
     GIT_COMMITTER_NAME: $GITLAB_USER_NAME
     GIT_COMMITTER_EMAIL: $GITLAB_USER_EMAIL
+    DOC_MAKE_TARGET: html
   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
+    - ./contrib/gitchangelog/gitchangelog.py HEAD^..HEAD >> $(ls doc/changelog/changelog-9.* | sort --version-sort | tail -n 1)
+  after_script:
+    - git diff
   needs:
     - job: autoreconf
       artifacts: true