-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 1.05 KB
/
Copy pathMakefile
File metadata and controls
44 lines (34 loc) · 1.05 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
SHELL := /bin/bash
CLUSTER_NAME ?= tinysystems-e2e
CRD_CHART_VERSION ?= latest
MODULE ?=
VERSION ?=
# KUBECONFIG is intentionally NOT defaulted here — we want the standard
# discovery (KUBECONFIG env, then ~/.kube/config). setup-cluster.sh writes
# to ~/.kube/config so local and CI use the same path.
.PHONY: cluster
cluster:
@./scripts/setup-cluster.sh $(CLUSTER_NAME)
.PHONY: install
install:
@if [ -z "$(MODULE)" ] || [ -z "$(VERSION)" ]; then \
echo "MODULE and VERSION required: make install MODULE=common-module VERSION=v0.5.0"; exit 1; \
fi
@./scripts/install-charts.sh $(MODULE) $(VERSION) $(CRD_CHART_VERSION)
.PHONY: test
test:
@go test -v -count=1 -timeout=15m ./scenarios/...
.PHONY: test-record
test-record:
@if [ -z "$(MODULE)" ] || [ -z "$(VERSION)" ]; then \
echo "MODULE and VERSION required for test-record"; exit 1; \
fi
@./scripts/run-and-record.sh $(MODULE) $(VERSION)
.PHONY: teardown
teardown:
@./scripts/teardown-cluster.sh $(CLUSTER_NAME)
.PHONY: e2e
e2e: cluster install test-record teardown
.PHONY: tidy
tidy:
@go mod tidy