Skip to content
Snippets Groups Projects
Commit 27a1aa1f authored by Danny Marc Rotscher's avatar Danny Marc Rotscher
Browse files

Replaced tag of the Docker image with $CI_PIPELINE_IID.

parent 666a1298
No related branches found
No related tags found
4 merge requests!322Merge preview into main,!319Merge preview into main,!253- Changed Docker image tag from CI_PIPELINE_IID to CI_PIPELINE_ID,!252Replaced tag of the Docker image with $CI_PIPELINE_IID.
variables:
GIT_STRATEGY: none
DOCKER_IMAGE: webpage:all
DOCKER_IMAGE: webpage:$CI_PIPELINE_IID
workflow:
rules:
......@@ -21,7 +21,7 @@ Build Linter:
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
script: docker build -t ${DOCKER_IMAGE} .
script: docker build -t "${DOCKER_IMAGE}" .
Test mkdocs:
stage: test
......@@ -30,43 +30,44 @@ Test mkdocs:
Lint changed md-files:
stage: test
script:
- docker run --rm -w /src -e CI_MERGE_REQUEST_TARGET_BRANCH_NAME ${DOCKER_IMAGE}
- docker run --rm -w /src -e CI_MERGE_REQUEST_TARGET_BRANCH_NAME "${DOCKER_IMAGE}"
doc.zih.tu-dresden.de/util/lint-changes.sh
only: [ merge_requests ]
Check links for changed md-files:
stage: test
script:
- docker run --rm -w /src -e CI_MERGE_REQUEST_TARGET_BRANCH_NAME ${DOCKER_IMAGE}
- docker run --rm -w /src -e CI_MERGE_REQUEST_TARGET_BRANCH_NAME "${DOCKER_IMAGE}"
doc.zih.tu-dresden.de/util/check-links.sh
only: [ merge_requests ]
Lint md-files:
stage: test
script: docker run --rm ${DOCKER_IMAGE} markdownlint docs
script: docker run --rm "${DOCKER_IMAGE}" markdownlint docs
only: [ main, preview ]
Check links for md-files:
stage: test
script:
- docker run --rm ${DOCKER_IMAGE}
- docker run --rm "${DOCKER_IMAGE}"
bash -c "find docs -type f -name '*.md' | xargs -L1 markdown-link-check --quiet"
only: [ main, preview ]
Release preview branch:
stage: release
script:
- docker run --rm -v /var/www/html/preview:/mnt ${DOCKER_IMAGE} mkdocs build --site-dir /mnt
- docker run --rm -v /var/www/html/preview:/mnt "${DOCKER_IMAGE}" mkdocs build --site-dir /mnt
only: [ preview ]
Release:
stage: release
script:
- docker run --rm -v /var/www/html/hpc-wiki:/mnt ${DOCKER_IMAGE} mkdocs build --site-dir /mnt
- docker run --rm -v /var/www/html/hpc-wiki:/mnt "${DOCKER_IMAGE}" mkdocs build --site-dir /mnt
only: [ main ]
Cleanup docker:
stage: cleanup
script:
- docker rmi "${DOCKER_IMAGE}"
- docker system prune --force
when: always
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