Commit c7f8c15d authored by René Fritze's avatar René Fritze Committed by René Fritze

[ci] split doc building + deployment, put a semaphore on deployment

parent 5cba94a6
......@@ -74,18 +74,30 @@ minimal_cpp_demo:
script: ./.ci/gitlab/cpp_demo.bash
pages build:
extends: .docker-in-docker
stage: build
script:
- apk --update add make python3
- pip3 install jinja2 pathlib
- make docker_docs
artifacts:
paths:
- docs/_build/html
- docs/error.log
pages:
# this needs to use a semaphore to avoid races on the docker images
# should become available with gitlab 12.6 (Dez. 17)
extends: .docker-in-docker
stage: deploy
resource_group: pages_deploy
dependencies:
- pages build
variables:
IMAGE: ${CI_REGISTRY_IMAGE}/docs:latest
script:
- apk --update add make python3
- pip3 install jinja2 pathlib
- .ci/gitlab/deploy_docs.bash
# only:
# - master
# - tags
......
......@@ -14,7 +14,6 @@ cd "${PYMOR_ROOT}"
# any failure here should fail the whole test
set -eux
export USER=pymor
make docker_docs
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
docker pull ${IMAGE}
......@@ -26,6 +25,7 @@ docker cp ${container}:/public/ ${PUBLIC_DIR}/ || echo "No previous docs builds
du -sch ${PUBLIC_DIR}/*
rm -rf ${PUBLIC_DIR}/${CI_COMMIT_REF_SLUG}/
# we get the already built html documentation as an artefact from an earlier build stage
rsync -a docs/_build/html/ ${PUBLIC_DIR}/${CI_COMMIT_REF_SLUG}/
cp -r docs/public_root/* ${PUBLIC_DIR}
${PYMOR_ROOT}/.ci/gitlab/docs_makeindex.py ${PUBLIC_DIR}
......
......@@ -70,18 +70,30 @@ minimal_cpp_demo:
image: pymor/testing_py3.7:{{ci_image_tag}}
script: ./.ci/gitlab/cpp_demo.bash
pages build:
extends: .docker-in-docker
stage: build
script:
- apk --update add make python3
- pip3 install jinja2 pathlib
- make docker_docs
artifacts:
paths:
- docs/_build/html
- docs/error.log
pages:
# this needs to use a semaphore to avoid races on the docker images
# should become available with gitlab 12.6 (Dez. 17)
extends: .docker-in-docker
stage: deploy
resource_group: pages_deploy
dependencies:
- pages build
variables:
IMAGE: ${CI_REGISTRY_IMAGE}/docs:latest
script:
- apk --update add make python3
- pip3 install jinja2 pathlib
- .ci/gitlab/deploy_docs.bash
# only:
# - master
# - tags
......
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