mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-09 23:12:10 -03:30
Use gitlab dynamic child pipelines feature to have one source of truth for the pre-commit jobs, the pre-commit config file. Use one cache per pre-commit. This should reduce the "fetching cache" time steps in gitlab-ci, since each job will have a separate cache with only its hook installed.
18 lines
396 B
YAML
18 lines
396 B
YAML
---
|
|
# stub pipeline for dynamic generation
|
|
pre-commit:
|
|
tags:
|
|
- light
|
|
image: 'ghcr.io/pre-commit-ci/runner-image@sha256:aaf2c7b38b22286f2d381c11673bec571c28f61dd086d11b43a1c9444a813cef'
|
|
variables:
|
|
PRE_COMMIT_HOME: /pre-commit-cache
|
|
script:
|
|
- pre-commit run -a $HOOK_ID
|
|
cache:
|
|
key: pre-commit-$HOOK_ID
|
|
paths:
|
|
- /pre-commit-cache
|
|
parallel:
|
|
matrix:
|
|
- HOOK_ID:
|