Verified Commit c3cfc4f7 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add input to control allow_failure value in the component job

parent 4d0a6de6
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,10 @@ spec:
    version:
      default: 2.20.0-py311
      description: An image tag for the version of pre-commit to use for checks
    allow-failure:
      type: boolean
      default: false
      description: Enable or disable pipeline continuation

---

@@ -15,6 +19,7 @@ Pre-Commit Hooks:
  image: docker.kodo.org.uk/ci-images/pre-commit:$[[ inputs.version ]]
  rules:
  - if: $CI_PIPELINE_SOURCE == "push"
    allow_failure: $[[ inputs.allow-failure ]]
  variables:
    PRE_COMMIT_HOME: $CI_PROJECT_DIR/.cache/pre-commit
  cache: