This repository was archived by the owner on Dec 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-hooks.yaml
55 lines (55 loc) · 2.57 KB
/
.pre-commit-hooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- id: travis-yml-lint
name: Travis Lint
entry: bash -c "for FILE in $@; do docker run --rm -v $(pwd):/project tianon/travis-cli lint $FILE; done"
language: system
files: \.travis.*\.y(a?)ml$
- id: helm-deps
name: Helm Dependency Update
entry: bash -c 'find helm -mindepth 1 -maxdepth 1 -type d | xargs -t -n1 -I% helm dep up %'
language: system
pass_filenames: false
- id: helm-lint
name: Helm Lint
entry: bash -c 'find helm -mindepth 1 -maxdepth 1 -type d | xargs -t -n1 -I% helm lint %'
language: system
pass_filenames: false
- id: kubepug-minimum
name: KubePug - k8s v1.15 minimum
entry: env K8S_TARGET_VERSION=v1.15.0 bash -c 'find . -name Chart.yaml | xargs -n1 -I% bash -c " dirname %" | xargs -n1 -I% bash -c "helm template % --api-versions $K8S_TARGET_VERSION | kubepug --error-on-deprecated --error-on-deleted --k8s-version $K8S_TARGET_VERSION --input-file /dev/stdin"'
language: system
pass_filenames: false
- id: kubepug-recommended
name: KubePug - k8s v1.18 recommended
entry: env K8S_TARGET_VERSION=v1.18.0 bash -c 'find . -name Chart.yaml | xargs -n1 -I% bash -c " dirname %" | xargs -n1 -I% bash -c "helm template % --api-versions $K8S_TARGET_VERSION | kubepug --error-on-deprecated --error-on-deleted --k8s-version $K8S_TARGET_VERSION --input-file /dev/stdin"'
language: system
pass_filenames: false
- id: kubepug-latest
name: KubePug - k8s latest
# do not fail pre-commit
entry: bash -c 'find . -name Chart.yaml | xargs -n1 -I% bash -c " dirname %" | xargs -n1 -I% bash -c "helm template % | kubepug --error-on-deprecated --error-on-deleted --input-file /dev/stdin" || true' --
language: system
pass_filenames: false
- id: plantuml-svg
name: PlantUML SVG converter
entry: bash -c "for FILE in $@; do cat $FILE | docker run --rm -i think/plantuml > ${FILE%.*}.svg; done"
language: system
types: [file]
files: \.puml$
- id: plantuml-png
name: PlantUML PNG converter
entry: bash -c "for FILE in $@; do cat $FILE | docker run --rm -i think/plantuml -tpng > ${FILE%.*}.png; done"
language: system
types: [file]
files: \.puml$
- id: drawio-export
name: DrawIO PNG converter
entry: docker run --rm -it -v $(pwd):/data rlespinasse/drawio-export --fileext svg --on-changes --remove-page-suffix
language: system
types: [file]
files: \.drawio$
pass_filenames: false
- id: checkov-helm
name: Checkov - Helm check
entry: bash -c 'find . -name Chart.yaml | xargs -n1 -I% bash -c " dirname %" | xargs -n1 -I% bash -c "helm template % > %.yaml && checkov -f %.yaml --framework kubernetes || true" --
language: system
pass_filenames: false