Loading .gitlab-ci.yml +3 −17 Original line number Diff line number Diff line Loading @@ -11,6 +11,9 @@ workflow: - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH include: - local: pipeline-templates/pre-commit.yml .python: image: python:3.9 Loading @@ -25,23 +28,6 @@ workflow: - pip install "pip>=21.3" Quality Gate: stage: .pre image: docker.kodo.org.uk/ci-images/pre-commit:latest variables: PRE_COMMIT_HOME: $CI_PROJECT_DIR/cache/pre-commit cache: key: $CI_JOB_IMAGE paths: [cache] rules: - if: $CI_PIPELINE_SOURCE == "push" - if: $CI_PIPELINE_SOURCE == "merge_request_event" script: - source .gitlab-ci.pre-commit-run.bash - pre_commit_run --hook-stage=commit - pre_commit_run --hook-stage=push Build Package: stage: build extends: [.python] Loading pipeline-templates/pre-commit.yml 0 → 100644 +13 −0 Original line number Diff line number Diff line Push Checks: stage: .pre image: docker.kodo.org.uk/ci-images/pre-commit:2.20.0 rules: - if: $CI_PIPELINE_SOURCE == "push" variables: PRE_COMMIT_HOME: $CI_PROJECT_DIR/cache/pre-commit cache: key: $CI_JOB_IMAGE paths: [cache] script: - pre-commit-run --hook-stage=commit - pre-commit-run --hook-stage=push Loading
.gitlab-ci.yml +3 −17 Original line number Diff line number Diff line Loading @@ -11,6 +11,9 @@ workflow: - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH include: - local: pipeline-templates/pre-commit.yml .python: image: python:3.9 Loading @@ -25,23 +28,6 @@ workflow: - pip install "pip>=21.3" Quality Gate: stage: .pre image: docker.kodo.org.uk/ci-images/pre-commit:latest variables: PRE_COMMIT_HOME: $CI_PROJECT_DIR/cache/pre-commit cache: key: $CI_JOB_IMAGE paths: [cache] rules: - if: $CI_PIPELINE_SOURCE == "push" - if: $CI_PIPELINE_SOURCE == "merge_request_event" script: - source .gitlab-ci.pre-commit-run.bash - pre_commit_run --hook-stage=commit - pre_commit_run --hook-stage=push Build Package: stage: build extends: [.python] Loading
pipeline-templates/pre-commit.yml 0 → 100644 +13 −0 Original line number Diff line number Diff line Push Checks: stage: .pre image: docker.kodo.org.uk/ci-images/pre-commit:2.20.0 rules: - if: $CI_PIPELINE_SOURCE == "push" variables: PRE_COMMIT_HOME: $CI_PROJECT_DIR/cache/pre-commit cache: key: $CI_JOB_IMAGE paths: [cache] script: - pre-commit-run --hook-stage=commit - pre-commit-run --hook-stage=push