-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
38 lines (37 loc) Β· 1.12 KB
/
.pre-commit-config.yaml
File metadata and controls
38 lines (37 loc) Β· 1.12 KB
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
---
repos:
- repo: local
hooks:
- id: helm-lint
name: Helm Lint
entry: >
bash -c '
echo "π Finding Helm charts...";
charts=$(find charts -name "Chart.yaml" -exec dirname {} \;);
if [ -z "$charts" ]; then echo "β No charts found!"; exit 1; fi;
exit_code=0;
while IFS= read -r chart; do
echo "π Linting: $chart";
if helm lint "$chart"; then
echo "β
Passed: $chart";
else
echo "β Failed: $chart";
exit_code=1;
fi;
done <<< "$charts";
if [ $exit_code -eq 0 ]; then
echo "π All charts linted successfully!";
else
echo "π₯ Some charts failed linting!"; exit 1;
fi
'
language: system
files: ^charts/.*\.(yaml|yml|tpl)$
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-yaml
exclude: ^charts/.*/templates/.*\.yaml$
- id: check-merge-conflict