Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (62 loc) · 3.31 KB
/
Copy pathMakefile
File metadata and controls
82 lines (62 loc) · 3.31 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.PHONY: lint unittest e2e e2e-netbird e2e-sqlite e2e-postgres e2e-mysql e2e-gateway e2e-oidc-keycloak e2e-oidc-zitadel e2e-keycloak e2e-keycloak-dev e2e-keycloak-postgres e2e-keycloak-replicas e2e-setup e2e-teardown test compat-matrix
CHARTS := $(wildcard charts/*)
# ── Lint ────────────────────────────────────────────────────────────────
lint:
@for chart in $(CHARTS); do \
echo "==> Linting $${chart}..."; \
helm lint "$${chart}"; \
done
# ── Unit Tests (helm-unittest) ──────────────────────────────────────────
unittest:
@for chart in $(CHARTS); do \
if [ -d "$${chart}/tests" ]; then \
echo "==> Testing $${chart}..."; \
helm unittest "$${chart}"; \
fi; \
done
# ── E2E Tests (kind) ───────────────────────────────────────────────────
E2E_CLUSTER := helms-e2e
e2e-setup:
@echo "==> Creating kind cluster $(E2E_CLUSTER)..."
kind create cluster --name $(E2E_CLUSTER) --wait 60s 2>/dev/null || true
kubectl cluster-info --context kind-$(E2E_CLUSTER)
# ── NetBird E2E ─────────────────────────────────────────────────────────
e2e-sqlite: e2e-setup
ci/scripts/netbird/e2e.sh sqlite
e2e-postgres: e2e-setup
ci/scripts/netbird/e2e.sh postgres
e2e-mysql: e2e-setup
ci/scripts/netbird/e2e.sh mysql
e2e-gateway: e2e-setup
ci/scripts/netbird/e2e-gateway.sh
e2e-oidc-keycloak: e2e-setup
ci/scripts/netbird/e2e-oidc.sh keycloak
e2e-oidc-zitadel: e2e-setup
ci/scripts/netbird/e2e-oidc.sh zitadel
e2e-netbird: e2e-setup
ci/scripts/netbird/e2e.sh sqlite
ci/scripts/netbird/e2e.sh postgres
ci/scripts/netbird/e2e.sh mysql
ci/scripts/netbird/e2e-gateway.sh
ci/scripts/netbird/e2e-oidc.sh keycloak
ci/scripts/netbird/e2e-oidc.sh zitadel
# ── Keycloak E2E ────────────────────────────────────────────────────────
e2e-keycloak-dev: e2e-setup
ci/scripts/keycloak/e2e.sh dev
e2e-keycloak-postgres: e2e-setup
ci/scripts/keycloak/e2e.sh postgres
e2e-keycloak-replicas: e2e-setup
ci/scripts/keycloak/e2e.sh replicas
e2e-keycloak: e2e-setup
ci/scripts/keycloak/e2e.sh dev
ci/scripts/keycloak/e2e.sh postgres
ci/scripts/keycloak/e2e.sh replicas
# ── All E2E ─────────────────────────────────────────────────────────────
e2e: e2e-netbird e2e-keycloak
e2e-teardown:
kind delete cluster --name $(E2E_CLUSTER) 2>/dev/null || true
# ── Compatibility Matrix ──────────────────────────────────────────────
compat-matrix: e2e-setup
ci/scripts/netbird/compat-matrix.sh
# ── Run all tests ──────────────────────────────────────────────────────
test: lint unittest