Commit d76c3e4c authored by Alex Pearce's avatar Alex Pearce 🌈
Browse files

Merge branch 'rm-ci-docs-never-fail' into 'master'

CI: only fail docs jobs on sphinx runs

See merge request lhcb/Moore!790
parents 88cfdf61 68c69a19
......@@ -85,13 +85,20 @@ build-docs:
before_script:
# As the previous stage is allowed to fail, skip this stage if the previous
# did not complete successfully (i.e. did not create the `run` symlink)
- test -L run || exit 0
- test -L run || { echo "WARNING build job failed, stopping"; exit 77; }
script:
- ./run make -C doc linkcheck
- ./run make -C doc html
# First try producing just the graphs (gaudirun.py). If that fails, Moore
# is likely incompatible with the last nightly, so fail with a warning.
- ./run make -C doc graphs || { echo "WARNING build is incompatible with last nightly, stopping"; exit 77; }
- reasons=
- ./run make -C doc linkcheck || reasons+='ERROR failed link check\n'
- ./run make -C doc html || reasons+='ERROR failed html generation\n'
- if [ -n "$reasons" ]; then echo -e $reasons; exit 1; fi
allow_failure:
exit_codes: 77
artifacts:
paths:
- "doc/_build/html/"
- doc/_build/html/
cache:
key: "$CI_JOB_NAME"
paths:
......@@ -102,7 +109,6 @@ deploy-docs:
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
rules:
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
when: always
variables:
# Need to ensure that the path up to $CI_COMMIT_REF_NAME exists (the
# deployment script does `mkdir`, not `mkdir -p`)
......@@ -112,6 +118,10 @@ deploy-docs:
# Makes sure files on the remote are deleted if missing from the source
METHOD: "rsync"
before_script:
- test -L run || exit 0
# As the previous stage is allowed to fail, skip this stage if the previous
# did not complete successfully (i.e. did not create the html directory)
- test -d $CI_OUTPUT_DIR || { echo "WARNING docs not built, stopping"; exit 77; }
script:
- deploy-eos && echo -e "Deployed at\n\n\thttps://lhcbdoc.web.cern.ch/lhcbdoc/moore/$CI_COMMIT_REF_NAME/index.html"
allow_failure:
exit_codes: 77
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