mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
* CI: Put pre-commit cache under CI_PROJECT_DIR Apparently gitlab-runner can't cache stuff outside of the project directory. Put the cache under CI_PROJECT_DIR to make it work (which also means we need to ignore it from ansible-lint). Also update the pre-commit image while we're at it. Link: https://gitlab.com/gitlab-org/gitlab/-/issues/14151 * update ansible-lint pre-commit
37 lines
754 B
YAML
37 lines
754 B
YAML
---
|
|
pre-commit:
|
|
stage: test
|
|
tags:
|
|
- ffci
|
|
image: 'ghcr.io/pre-commit-ci/runner-image@sha256:fe01a6ec51b298412990b88627c3973b1146c7304f930f469bafa29ba60bcde9'
|
|
variables:
|
|
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|
|
script:
|
|
- pre-commit run --all-files --show-diff-on-failure
|
|
cache:
|
|
key: pre-commit-2
|
|
paths:
|
|
- ${PRE_COMMIT_HOME}
|
|
when: 'always'
|
|
needs: []
|
|
|
|
vagrant-validate:
|
|
extends: .job
|
|
stage: test
|
|
tags: [ffci]
|
|
variables:
|
|
VAGRANT_VERSION: 2.3.7
|
|
script:
|
|
- ./tests/scripts/vagrant-validate.sh
|
|
except: ['triggers', 'master']
|
|
|
|
|
|
# TODO: convert to pre-commit hook
|
|
check-galaxy-version:
|
|
needs: []
|
|
stage: test
|
|
tags: [ffci]
|
|
image: python:3
|
|
script:
|
|
- tests/scripts/check_galaxy_version.sh
|