variables: UV_VERSION: 0.5 PYTHON_VERSION: 3.12 BASE_LAYER: bookworm-slim # GitLab CI creates a separate mountpoint for the build directory, # so we need to copy instead of using hard links. UV_LINK_MODE: copy .base_ruff: stage: build interruptible: true image: name: ghcr.io/astral-sh/ruff:0.11.10-alpine before_script: - cd $CI_PROJECT_DIR - ruff --version Ruff Check: extends: .base_ruff script: - ruff check --output-format=gitlab > code-quality-report.json artifacts: reports: codequality: $CI_PROJECT_DIR/code-quality-report.json Ruff Format: extends: .base_ruff script: - ruff format --diff pytest: image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER stage: test script: - uv run pytest --junitxml=report.xml artifacts: when: always reports: junit: report.xml create_container: stage: deploy image: name: gcr.io/kaniko-project/executor:v1.23.2-debug entrypoint: [""] script: - /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_BRANCH}" --cleanup