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

Turn CI template into a component

parent 5645d85b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ variables:
    description: Comma separated list of platforms to build images for

include:
  local: pipeline-template.yaml
  component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/pre-commit@$CI_COMMIT_SHA

Build:
  stage: build

README.md

0 → 100644
+4 −0
Original line number Diff line number Diff line
Pre-Commit CI Component
=======================

This component runs pre-commit checks on pushes to branches.
+25 −0
Original line number Diff line number Diff line
variables:
  PRE_COMMIT_TAG:
    value: 2.20.0-py311
spec:
  inputs:
    stage:
      default: .pre
      description: Name of the stage in which to run pre-commit hooks. Defaults
        to the special stage which runs before all others
    version:
      default: 2.20.0-py311
      description: An image tag for the version of pre-commit to use for checks

---

Pre-Commit Hooks:
  stage: .pre
  image: docker.kodo.org.uk/ci-images/pre-commit:$PRE_COMMIT_TAG
  stage: $[[ inputs.stage ]]
  image: docker.kodo.org.uk/ci-images/pre-commit:$[[ inputs.version ]]
  rules:
  - if: $CI_PIPELINE_SOURCE == "push"
  variables: