forked from kubernetes-retired/minibroker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 976 Bytes
/
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
REPO ?= github.com/osbkit/minibroker
BINARY ?= minibroker
PKG ?= $(REPO)/cmd/$(BINARY)
IMAGE ?= carolynvs/minibroker
TAG ?= latest
build:
go build $(PKG)
test:
go test -v ./...
svcat get plans | grep db
svcat provision mydb --class mariadb --plan 10-1-31 --namespace minibroker
svcat get instances -n minibroker
svcat bind mydb
svcat get bindings -n minibroker
build-linux:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -o $(BINARY)-linux -tags netgo --ldflags="-s" $(PKG)
image: build-linux
cp $(BINARY)-linux image/$(BINARY)
docker build image/ -t "$(IMAGE):$(TAG)"
clean:
-rm -f $(BINARY)
push: image
docker push "$(IMAGE):$(TAG)"
create-cluster:
./hack/create-cluster.sh
deploy: push
helm upgrade --install minibroker --namespace minibroker \
--recreate-pods --force charts/minibroker \
--set image="$(IMAGE):$(TAG)",imagePullPolicy="Always",deploymentStrategy="Recreate"
.PHONY: build build-linux test image clean push create-cluster deploy