]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Separate documentation autobuild
authorMaria Matejka <mq@ucw.cz>
Mon, 20 Jan 2025 17:26:34 +0000 (18:26 +0100)
committerMaria Matejka <mq@ucw.cz>
Tue, 1 Apr 2025 10:09:11 +0000 (12:09 +0200)
This is expected to hit a webhook inside our CI to trigger
automatic deployment to testweb.

.gitlab-ci.yml
misc/docker/docbuilder/Dockerfile [new file with mode: 0644]

index 636ae6f1749c36ea3412511cba0ca6d0a3747ece..9600e65b738a96b3b74478390e13c4bd1a2e1595 100644 (file)
@@ -8,7 +8,7 @@ variables:
   STAYRTR_BINARY: /usr/bin/stayrtr
 
 stages:
-#  - image
+  - image
   - build
   - pkg
   - test
@@ -17,7 +17,7 @@ stages:
   stage: image
   allow_failure: true
   script:
-  - $DOCKER_CMD login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.nic.cz
+  - $DOCKER_CMD login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.nic.cz
   # Make sure we refresh the base image if it updates (eg. security updates, etc)
   # If we do just the build, cache is always reused and the freshness of the
   # base image is never checked. However, pull always asks and updates the
@@ -32,6 +32,20 @@ stages:
   tags:
   # That's Docker in Docker
   - dind
+  rules:
+  - if: '$CI_COMMIT_TAG'
+    # Never rebuild for tags
+    when: never
+  - changes:
+    # Do any change in Dockerfile (e.g. change a comment) to rebuild the image
+    - misc/docker/$IMG_NAME/Dockerfile
+    when: always
+  - when: never
+
+docker-docbuilder:
+  variables:
+    IMG_NAME: "docbuilder"
+  <<: *docker_build
 
 # Docker build example
 #docker_debian-11-amd64:
@@ -51,7 +65,22 @@ stages:
   - $MAKE
   - $MAKE check
   # Build docs when tools are available
-  - if which linuxdoc pdflatex >/dev/null ; then $MAKE docs ; fi
+  - if which linuxdoc pdflatex sgmlsasp >/dev/null ; then $MAKE docs ; fi
+
+build-only-doc:
+  image: registry.nic.cz/labs/bird:docbuilder
+  stage: build
+  tags:
+    - docker
+    - linux
+  script:
+    - autoreconf
+    - ./configure --with-protocols= --disable-client
+    - make obj/doc/bird-singlepage.html
+  artifacts:
+    paths: 
+      - obj/doc/bird-singlepage.html
+    expire_in: 1 month
 
 .build-linux: &build-linux
   <<: *build-base
diff --git a/misc/docker/docbuilder/Dockerfile b/misc/docker/docbuilder/Dockerfile
new file mode 100644 (file)
index 0000000..71ab296
--- /dev/null
@@ -0,0 +1,18 @@
+# bump this to recreate the image: 2
+FROM debian:bookworm-slim
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get -y update
+RUN apt-get -y upgrade
+RUN apt-get -y --no-install-recommends install \
+       build-essential \
+       flex \
+       bison \
+       autoconf \
+       git \
+       pandoc \
+       linuxdoc-tools-latex \
+       texlive-latex-extra \
+       groff \
+       opensp \
+       docbook-xsl \
+       xsltproc