Commit 4e1800a0 authored by Andrii Salnikov's avatar Andrii Salnikov

attempt to speed-up CI with cache

parent 79788ecf
Pipeline #4295 passed with stages
in 19 minutes and 51 seconds
......@@ -5,28 +5,44 @@ stages:
build_docs:
stage: build
image: fedora:28
variables:
# use faster storage driver in all cases
DOCKER_DRIVER: overlay2
script:
- dnf -y install @buildsys-build
- dnf -y install autoconf automake libtool gettext-devel git
- dnf -y install graphviz python-sphinx python-sphinx-argparse
- dnf -y install texlive-collection-latexextra latexmk
- dnf -y install python-isodate python-ldap
- dnf -y install doxygen
- bash build.sh
- tar czf $CI_PROJECT_DIR/sphinx-docs.tar.gz -C build/html .
- mv build/html $CI_PROJECT_DIR/
# make DNF cache directory in project tree
- rm -rf /var/cache/dnf
- mkdir -p $CI_PROJECT_DIR/.cache/dnf
- ln -s $CI_PROJECT_DIR/.cache/dnf /var/cache/dnf
# install dependencies
- dnf -y install @buildsys-build
- dnf -y install autoconf automake libtool gettext-devel git
- dnf -y install graphviz python-sphinx python-sphinx-argparse
- dnf -y install texlive-collection-latexextra latexmk
- dnf -y install python-isodate python-ldap
- dnf -y install doxygen
# run build script
- bash build.sh
# create rendered docs archive
- tar czf $CI_PROJECT_DIR/sphinx-docs.tar.gz -C build/html .
- mv build/html $CI_PROJECT_DIR/
tags:
- docs
# save DNF cache across the builds
cache:
key: dnf-cache
paths:
- .cache/dnf/
# define artifacts
artifacts:
when: on_success
expire_in: 30 days
paths:
- $CI_PROJECT_DIR/sphinx-docs.tar.gz
- $CI_PROJECT_DIR/html
# download latest documentation tarball: https://source.coderefinery.org/nordugrid/doc/-/jobs/artifacts/master/raw/sphinx-docs.tar.gz?job=build_docs
- $CI_PROJECT_DIR/sphinx-docs.tar.gz
- $CI_PROJECT_DIR/html
allow_failure: false
# download latest documentation tarball: https://source.coderefinery.org/nordugrid/doc/-/jobs/artifacts/master/raw/sphinx-docs.tar.gz?job=build_docs
# deploy GitLab pages for master
pages:
stage: deploy_pages
image: fedora:28
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment