forked from liftbridge-io/liftbridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (45 loc) · 1.34 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
KIND_CLUSTER_NAME=kind
KIND_KUBECONFIG:=~/.kube/kind-config-$(KIND_CLUSTER_NAME)
.PHONY: compose-up
compose-up:
cd docker/dev-cluster/; docker-compose up --build
.PHONY: compose-down
compose-down:
cd docker/dev-cluster/; docker-compose down --rmi local
.PHONY: push-k8s-image
push-k8s-image:
skaffold run -p deploy-k8s-image
.PHONY: kind-up
kind-up:
kind create cluster --config k8s/dev/kind.yaml --name=$(KIND_CLUSTER_NAME)
.PHONY: kind-down
kind-down:
kind delete cluster --name=$(KIND_CLUSTER_NAME)
.PHONY: kind-apply
kind-apply:
KUBECONFIG=$(KIND_KUBECONFIG) kubectl apply -R -f k8s/dev/nats-operator.yaml
KUBECONFIG=$(KIND_KUBECONFIG) skaffold dev -p dev
.PHONY: kind-export
kind-export:
echo export KUBECONFIG="$$(kind get kubeconfig-path --name="$(KIND_CLUSTER_NAME)")"
build: liftbridge
liftbridge:
GO111MODULE=on CGO_ENABLED=0 go build -mod=readonly -o liftbridge
build-dev: liftbridge-dev
liftbridge-dev:
CGO_ENABLED=1 go build -tags netgo -ldflags '-extldflags "-static"' -mod=readonly -o liftbridge-dev
.PHONY: clean
clean:
rm -f liftbridge
rm -f liftbridge-dev
.PHONY: website-deploy
website-deploy: website/build
gcloud app deploy $(WEBSITE_DEPLOY_FLAGS) website/app.yaml
website/build:
yarn --cwd website run build
.PHONY: website-clean
website-clean:
rm -rf website/build
.PHONY: website-up
website-up:
yarn --cwd website start