-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (41 loc) · 1.23 KB
/
Makefile
File metadata and controls
44 lines (41 loc) · 1.23 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
43
44
.PHONY: template-all deps deps-update
# Build dependencies from lock files (for CI)
deps:
@for chart in stable/*/; do \
if [ -f "$${chart}Chart.yaml" ] && [ -f "$${chart}Chart.lock" ]; then \
chart_name=$$(basename "$$chart"); \
echo "Building dependencies for $$chart_name..."; \
helm dependency build "$$chart"; \
fi; \
done
# Update dependencies and refresh lock files (for development)
deps-update:
@for chart in stable/*/; do \
if [ -f "$${chart}Chart.yaml" ]; then \
if grep -q "dependencies:" "$${chart}Chart.yaml"; then \
chart_name=$$(basename "$$chart"); \
echo "Updating dependencies for $$chart_name..."; \
helm dependency update "$$chart"; \
fi; \
fi; \
done
template-all:
@failed=0; \
for chart in stable/*/; do \
if [ -f "$${chart}Chart.yaml" ]; then \
chart_name=$$(basename "$$chart"); \
echo "Validating $$chart_name..."; \
if helm template test-release "$$chart" > /dev/null 2>&1; then \
echo "✓ $$chart_name rendered successfully"; \
else \
echo "✗ $$chart_name failed to render:"; \
helm template test-release "$$chart"; \
failed=1; \
fi; \
echo ""; \
fi; \
done; \
if [ $$failed -eq 1 ]; then \
echo "Some charts failed validation"; \
exit 1; \
fi