gitlab-build-images/.gitlab/ci/definitions.yml
Lukas Eipert a9cf88c469 Welcome to the matrix
This refactors our custom image building to utilize GitLab parallel jobs
with a matrix.

This makes it easier to parse what kind of matrix we are going to build
in our docker images. Furthermore instead of splitting the image name,
we can simply pull the versions of the tools from the environment
variables.

The ultimative reason: Dogfooding
2021-12-07 12:10:42 +01:00

25 lines
576 B
YAML

# Run test job always
.test:
stage: test
rules:
- when: always
# Run build job only on a default branch when triggered manually
.deploy:
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
.test_custom:
extends: .test
script:
- ./scripts/custom-docker-build
rules:
- when: always
.build_and_deploy_custom:
extends: .deploy
script:
- ./scripts/custom-docker-build --label "ci_pipeline_url=$CI_PIPELINE_URL" --label "ci_job_url=$CI_JOB_URL" -t "$CI_REGISTRY_IMAGE:$1"
- ./scripts/custom-docker-push