-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (45 loc) · 1.23 KB
/
Makefile
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
BIN_DIR=./target
AGENT_IMAGE=commander-agent
COMMANDER_IMAGE=commander
KIND_CLUSTER_NAME=commander
.PHONY: build-commander
build-commander:
cargo build --package commander
.PHONY: build-agent
build-agent:
cargo build --package agent
.PHONY: build
build: build-commander build-agent
.PHONY: test-messages
test-messages:
cargo test --package messages
.PHONY: test-commander
test-commander:
cargo test --package commander
.PHONY: test-agent
test-agent:
cargo test --package agent
.PHONY: test
test: test-commander test-agent test-messages
.PHONY: clean
clean:
@rm -rf ${BIN_DIR}
.PHONY: kind
kind:
kind create cluster --name ${KIND_CLUSTER_NAME}
.PHONY: kind-clean
kind-clean:
kind delete cluster --name ${KIND_CLUSTER_NAME}
.PHONY: docker-build-agent
docker-build-agent:
docker build -t ${AGENT_IMAGE} . -f ./agent/Dockerfile
.PHONY: docker-build-commander
docker-build-commander:
docker build -t ${COMMANDER_IMAGE} . -f ./commander/Dockerfile
.PHONY: test-deploy
test-deploy:
kind load docker-image ${AGENT_IMAGE} --name ${KIND_CLUSTER_NAME}
kind load docker-image ${COMMANDER_IMAGE} --name ${KIND_CLUSTER_NAME}
kubectl apply -f ./e2e/manifest.yaml
.PHONY: test-locally
test-locally: docker-build-agent docker-build-commander test-deploy