diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 32d295b..4d689fc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: - release pre-commit: - image: python + image: python:alpine stage: lint rules: # Run only if merge request @@ -14,13 +14,14 @@ pre-commit: # Run if commit on default branch - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH before_script: + - apk add git - pip install pre-commit script: - pre-commit run --all --show-diff-on-failure --verbose --color always check_version: stage: lint - image: python:latest + image: python:alpine rules: # Run if commit that start with a version number is pushed - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+.*/ @@ -33,7 +34,7 @@ check_version: check_changelog: stage: lint - image: python:latest + image: python:alpine rules: # Run if commit that start with a version number is pushed - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/ @@ -46,7 +47,7 @@ check_changelog: pytest: image: - name: python:$PYTHON_VERSION + name: python:$PYTHON_VERSION-alpine stage: test tags: - cie-oow-dind-runner @@ -65,6 +66,7 @@ pytest: DOCKER_TLS_CERTDIR: "" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+)\%/' before_script: + - apk add git - pip install poetry - export PATH="$HOME/.local/bin:$PATH" - poetry install --all-extras @@ -80,7 +82,7 @@ pytest: build: stage: build - image: python:latest + image: python:alpine rules: # Run if merge request - if: $CI_PIPELINE_SOURCE == "merge_request_event" @@ -100,7 +102,7 @@ build: publish: stage: publish - image: python:latest + image: python:alpine rules: # Run if commit that start with a version number is pushed - if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+.*/