summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-08-29 17:12:58 +0200
committerCarlos Garnacho <carlosg@gnome.org>2021-08-29 22:33:30 +0200
commit9324fefd54f7a0ad6219c144fcaa0369e2f56f8f (patch)
tree8bd4bedf05d13e0975d459e7e31f380edea85758 /.gitlab-ci.yml
parent24c58d3313518f474d3ae3b39b69b1cb707ae3a8 (diff)
downloadtracker-9324fefd54f7a0ad6219c144fcaa0369e2f56f8f.tar.gz
ci: Add intermediate job to build the website before deploying
This job allows us to check website output in merge requests, before having it deployed to the gitlab pages. The script that generates the website HTML has been changed to allow specifying the output directory, so it's not always the "public" special directory.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml38
1 files changed, 25 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8bb04fcda..0fb0d6515 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -321,6 +321,29 @@ test-alpine@x86_64:
- build-alpine-edge@x86_64
<<: *test
+test-website:
+ extends:
+ - .fdo.distribution-image@fedora
+ - .tracker.fedora:34@x86_64
+ stage: test
+ script:
+ - export install_prefix="$(pwd)/tracker-install"
+ # Build tracker and install.
+ - mkdir website-build; pushd website-build; meson .. --prefix="$install_prefix"; ninja; ninja install; popd
+ # Build tracker-miners and install any documentation from there as well.
+ - .gitlab-ci/checkout-tracker-miners.sh
+ - pushd extra/tracker-miners; mkdir build; pushd build; env PKG_CONFIG_PATH="$install_prefix/lib64/pkgconfig" meson .. --prefix="$install_prefix"; ninja install; popd; popd
+ # Generate the website using mkdocs.
+ - |
+ export tracker_commit=$CI_COMMIT_SHA
+ export tracker_miners_commit=$(git -C ./extra/tracker-miners rev-parse HEAD)
+ ./docs/website/build.py --output=website --api-docs="$install_prefix/share/gtk-doc/html" --tracker-commit=${tracker_commit} --man-pages ./docs/manpages/*.txt ./extra/tracker-miners/docs/manpages/*.txt
+ artifacts:
+ paths:
+ - website
+ needs:
+ - build-fedora-container@x86_64
+
coverage-analysis:
extends:
- .fdo.distribution-image@fedora
@@ -389,22 +412,11 @@ pages:
- .tracker.fedora:34@x86_64
stage: website
script:
- - export install_prefix="$(pwd)/tracker-install"
- # Build tracker and install.
- - mkdir website-build; pushd website-build; meson .. --prefix="$install_prefix"; ninja; ninja install; popd
- # Build tracker-miners and install any documentation from there as well.
- - .gitlab-ci/checkout-tracker-miners.sh
- - pushd extra/tracker-miners; mkdir build; pushd build; env PKG_CONFIG_PATH="$install_prefix/lib64/pkgconfig" meson .. --prefix="$install_prefix"; ninja install; popd; popd
- # Generate the website using mkdocs.
- - |
- export tracker_commit=$CI_COMMIT_SHA
- export tracker_miners_commit=$(git -C ./extra/tracker-miners rev-parse HEAD)
- ./docs/website/build.py --api-docs="$install_prefix/share/gtk-doc/html" --tracker-commit=${tracker_commit} --man-pages ./docs/manpages/*.txt ./extra/tracker-miners/docs/manpages/*.txt
+ - mv website public
artifacts:
paths:
- public
needs:
- - build-fedora-container@x86_64
+ - test-website
only:
- master
- - /^sam\/website.*$/