-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhelm_checker.sh
More file actions
executable file
·42 lines (38 loc) · 1.07 KB
/
helm_checker.sh
File metadata and controls
executable file
·42 lines (38 loc) · 1.07 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
39
40
41
42
#!/usr/bin/env bash
addons=$1
success=$(find $addons -type f -name "meta.yaml" | xargs yq || echo false)
if [[ success == "false" ]]; then
echo -e "\033[31mCheck meta.yaml format error\033[0m"
exit 100
else
echo -e "\033[32mCheck meta.yaml format ok\033[0m"
fi
success=$(find $addons -type f -name "values.yaml" | xargs yq || echo false)
if [[ success == "false" ]]; then
echo -e "\033[31mCheck values.yaml format error\033[0m"
exit 100
else
echo -e "\033[32mCheck values.yaml format ok\033[0m"
fi
for addon in $addons/chart/*/; do
cd $addon
success=$(helm dependency update || echo false)
if [[ success == "false" ]]; then
echo -e "\033[31mUpdate $addon dependency error\033[0m"
exit 100
fi
for bind in ../../plans/*/bind.yaml; do
echo -e "Copy $bind"
cp $bind templates
success=$(helm template . || echo false)
rm templates/bind.yaml -f
if [[ success == "false" ]]; then
echo -e "\033[31mCheck $addon error\033[0m"
exit 100
else
echo -e "\033[32mCheck $addon ok\033[0m"
fi
done
rm -rf Chart.lock charts
cd -
done