Skip to content
Snippets Groups Projects
Commit 7da636c7 authored by Guillaume Samson's avatar Guillaume Samson :snowman2:
Browse files

Merge branch '14-ci-pipeline-improvements' into 'main'

Resolve "CI pipeline improvements"

Closes #14

See merge request !24
parents 99b1c24e c9374fe5
No related branches found
No related tags found
1 merge request!24Resolve "CI pipeline improvements"
Pipeline #3193 passed with stage
in 6 minutes and 22 seconds
# docker packages
image: registry.gitlab.com/islandoftex/images/texlive:TL2021-historic
workflow:
# avoid to trigger pipeline for each commit
# pipeline should be triggered using https://forge.nemo-ocean.eu/nemo/doc/manuals/-/pipelines/new
rules:
- if: $CI_PIPELINE_SOURCE == 'web'
- if: $CI_PIPELINE_SOURCE == 'schedule'
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_COMMIT_TITLE =~ /(?i).*\[ci\].*/
variables:
GIT_SUBMODULE_STRATEGY: recursive
MANUALS:
description: "Manual(s) to be built"
value: "all"
options:
- "all"
- "NEMO"
- "SI3"
- "TOP"
# input version for release (available only when pipeline is run manually)
DRAFT_MODE:
description: "Enable/disable latex draft mode (faster rendering without figures)"
value: "yes"
options:
- "yes"
- "no"
DEBUG_MODE:
description: "Print or not latex compilation details in log file for debugging"
value: "no"
options:
- "yes"
- "no"
VERSION:
value: ""
description: "Set version release number for manuals"
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- if [[ ${DRAFT_MODE} == "no" ]]; then BUILD_OPT="-p"; fi
- if [[ ${DEBUG_MODE} == "yes" ]]; then BASH_OPT="-x"; fi
# docker packages
image: registry.gitlab.com/islandoftex/images/texlive:TL2021-historic
NEMO manual:
tags:
- docker
stage: build
#when: manual
rules:
- if: ($MANUALS == "NEMO" || $MANUALS == "all")
script:
- version=${CI_COMMIT_REF_NAME}
- if [ "x${VERSION}" != "x" ] ; then version=${VERSION} ; fi
- bash -x manual_build.sh -r ${version} -p NEMO
- bash ${BASH_OPT} manual_build.sh ${BUILD_OPT} -r ${VERSION:-CI_COMMIT_REF_NAME} NEMO
artifacts:
paths:
- NEMO_manual.pdf
expire_in: 15 mins
SI3 manual:
tags:
- docker
stage: build
rules:
- if: ($MANUALS == "SI3" || $MANUALS == "all")
script:
- bash ${BASH_OPT} manual_build.sh ${BUILD_OPT} -r ${VERSION:-CI_COMMIT_REF_NAME} SI3
artifacts:
paths:
- SI3_manual.pdf
expire_in: 15 mins
TOP manual:
tags:
- docker
stage: build
#when: manual
rules:
- if: ($MANUALS == "TOP" || $MANUALS == "all")
script:
- version=${CI_COMMIT_REF_NAME}
- if [ "x${VERSION}" != "x" ] ; then version=${VERSION} ; fi
- bash -x manual_build.sh -r ${version} -p TOP
- bash ${BASH_OPT} manual_build.sh ${BUILD_OPT} -r ${VERSION:-CI_COMMIT_REF_NAME} TOP
artifacts:
paths:
- TOP_manual.pdf
expire_in: 15 mins
SI3 manual:
# generic job (needs to be parallelized)
.build_manual:
tags:
- docker
stage: build
#when: manual
script:
- version=${CI_COMMIT_REF_NAME}
- if [ "x${VERSION}" != "x" ] ; then version=${VERSION} ; fi
- bash -x manual_build.sh -r ${version} -p SI3
- bash ${BASH_OPT} manual_build.sh ${BUILD_OPT} -r ${VERSION:-$CI_COMMIT_REF_NAME} ${MANUALS}
artifacts:
paths:
- SI3_manual.pdf
expire_in: 15 mins
- ./*_manual.pdf
expire_in: 15 mins
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment