container-pre-commit/.woodpecker/.test.yaml
Henrik Hüttemann 800445ebbb
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
WIP
2024-06-20 22:52:31 +02:00

40 lines
923 B
YAML

skip_clone: true
when:
- event: push
depends_on:
- build
variables:
- &image 'git.verdigado.com/verdigado-images/container-pre-commit:${CI_COMMIT_SHA}'
steps:
salt clone:
image: woodpeckerci/plugin-git
settings:
remote: https://git.verdigado.com/verdigado-Privileged/Salt.git
path: salt
sha: ''
ref: refs/heads/master
branch: master
await-image:
image: alpine
environment:
IMAGE: *image
commands:
- echo -${CI_COMMIT_SHA}-
- apk add --update --no-cache img
- 'while ! img pull $IMAGE 2>&1 | grep "Error: failed to unmount" ; do echo "Awaiting image $IMAGE..."; sleep 3; done'
salt pre-commit:
image: *image
depends_on:
- await-image
- salt clone
environment:
- SKIP=no-commit-to-branch # Ignore "don't commit to protected branch" check
commands:
- cd salt
- pre-commit run --all-files