]> xenbits.xensource.com Git - libvirt.git/commitdiff
gitlab: use CI for building website contents
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 6 Mar 2020 14:56:42 +0000 (14:56 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 27 Mar 2020 12:32:48 +0000 (12:32 +0000)
Run the bare minimum build that is possible to create the docs, avoiding
compiling code which other jobs will deal with.

The generated website is published as an artifact and thus is browsable
by developers on build completion and can be downloaded as a zip file.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
.gitlab-ci.yml

index 8d22706bd444c5ec5c238f63bef03d91244b27cb..b79d9a2b77d5445a69fa5531fb47be852836c384 100644 (file)
@@ -3,6 +3,7 @@ variables:
   GIT_DEPTH: 100
 
 stages:
+  - prebuild
   - cross_build
 
 
@@ -53,3 +54,25 @@ debian-sid-cross-i686:
 debian-sid-cross-mipsel:
   <<: *cross_build_default_job_definition
   image: quay.io/libvirt/buildenv-libvirt-debian-sid-cross-mipsel:latest
+
+# This artifact published by this job is downloaded by libvirt.org to
+# be deployed to the web root:
+#    https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?job=website
+website:
+  stage: prebuild
+  script:
+    - mkdir build
+    - cd build
+    - ../autogen.sh --prefix=$(pwd)/../vroot || (cat config.log && exit 1)
+    - $MAKE -j $(getconf _NPROCESSORS_ONLN) -C docs
+    - $MAKE -j $(getconf _NPROCESSORS_ONLN) -C docs install
+    - cd ..
+    - mv vroot/share/doc/libvirt/html/ website
+  image: quay.io/libvirt/buildenv-libvirt-fedora-31:latest
+  artifacts:
+    expose_as: 'Website'
+    name: 'website'
+    when: on_success
+    expire_in: 30 days
+    paths:
+      - website