-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
123 lines (85 loc) · 2.6 KB
/
Makefile
File metadata and controls
123 lines (85 loc) · 2.6 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
SHELL := /bin/sh
CONTROL_PLANE_IMAGE := ghcr.io/gnix0/dispatchd-control-plane:dev
SCHEDULER_IMAGE := ghcr.io/gnix0/dispatchd-scheduler:dev
WORKER_GATEWAY_IMAGE := ghcr.io/gnix0/dispatchd-worker-gateway:dev
KIND_CLUSTER_NAME ?= dispatchd
IMAGE_TAG ?= dev
.PHONY: fmt fmt-check lint test build proto proto-check proto-breaking \
docker-build-control-plane docker-build-scheduler docker-build-worker-gateway \
compose-config compose-up compose-down k8s-render k8s-validate argocd-render \
k8s-render-staging k8s-render-prod \
kind-up kind-down gitops-update-dev backup-postgres restore-postgres failover-smoke \
validate-backup-restore perf-stack-up perf-stack-down perf-k6-smoke perf-k6-average perf-k6-stress \
perf-worker-smoke perf-worker-average perf-worker-stress perf-e2e-smoke perf-e2e-average
fmt:
go fmt ./...
fmt-check:
./scripts/check-gofmt.sh
lint:
golangci-lint run ./...
test:
go test ./...
build:
go build ./...
proto:
./scripts/proto.sh generate
proto-check:
./scripts/proto.sh check
proto-breaking:
./scripts/proto.sh breaking
docker-build-control-plane:
docker build --build-arg SERVICE=control-plane -t "$(CONTROL_PLANE_IMAGE)" .
docker-build-scheduler:
docker build --build-arg SERVICE=scheduler -t "$(SCHEDULER_IMAGE)" .
docker-build-worker-gateway:
docker build --build-arg SERVICE=worker-gateway -t "$(WORKER_GATEWAY_IMAGE)" .
compose-config:
docker compose config
compose-up:
docker compose up --build -d
compose-down:
docker compose down --remove-orphans
k8s-render:
kubectl kustomize deploy/overlays/dev
k8s-render-staging:
kubectl kustomize deploy/overlays/staging
k8s-render-prod:
kubectl kustomize deploy/overlays/prod
k8s-validate:
kubectl kustomize deploy/overlays/dev >/dev/null
argocd-render:
kubectl kustomize deploy/argocd
gitops-update-dev:
./scripts/update-dev-image-tags.sh "$(IMAGE_TAG)"
kind-up:
./scripts/kind-up.sh
kind-down:
./scripts/kind-down.sh
backup-postgres:
./scripts/backup-postgres.sh
restore-postgres:
./scripts/restore-postgres.sh
failover-smoke:
./scripts/failover-smoke.sh
validate-backup-restore:
./scripts/validate-backup-restore.sh
perf-stack-up:
docker compose up --build -d
perf-stack-down:
docker compose down --remove-orphans
perf-k6-smoke:
./scripts/perf-k6.sh smoke
perf-k6-average:
./scripts/perf-k6.sh average
perf-k6-stress:
./scripts/perf-k6.sh stress
perf-worker-smoke:
./scripts/perf-worker-load.sh smoke
perf-worker-average:
./scripts/perf-worker-load.sh average
perf-worker-stress:
./scripts/perf-worker-load.sh stress
perf-e2e-smoke:
./scripts/perf-e2e.sh smoke
perf-e2e-average:
./scripts/perf-e2e.sh average