-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 939 Bytes
/
Makefile
File metadata and controls
27 lines (22 loc) · 939 Bytes
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
# Run helm template and helm lint across all charts
CHARTS := $(sort $(dir $(wildcard charts/*/Chart.yaml)))
CHARTS := $(patsubst charts/%/,charts/%,$(CHARTS))
.PHONY: test lint template repo-setup
test: repo-setup lint template
repo-setup:
@helm repo add openshift-charts https://charts.openshift.io 2>/dev/null || true
@helm repo add bitnami https://charts.bitnami.com/bitnami 2>/dev/null || true
@helm repo add backstage https://backstage.github.io/charts 2>/dev/null || true
@helm repo add helm-repository https://rh-mobb.github.io/validated-pattern-helm-charts/ 2>/dev/null || true
@helm repo update 2>/dev/null || true
lint:
@for chart in $(CHARTS); do \
echo "==> Linting $$chart"; \
helm lint "$$chart" || exit 1; \
done
template:
@for chart in $(CHARTS); do \
echo "==> Template $$chart"; \
helm dependency update "$$chart" 2>/dev/null || true; \
helm template test "$$chart" > /dev/null || exit 1; \
done