-
Notifications
You must be signed in to change notification settings - Fork 177
/
Copy pathMakefile
43 lines (32 loc) · 1.49 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
DEFAULT: build
PROGVER = $(shell grep 'const progversion = ' main.go | awk '{print $$4}' | sed -e 's/\"//g')
deps:
go get
build: deps
go build -o ${GOPATH}/bin/trickster
release: build release-artifacts docker docker-release
release-artifacts:
GOOS=darwin GOARCH=amd64 go build -o ./OPATH/trickster-$(PROGVER).darwin-amd64 && gzip -f ./OPATH/trickster-$(PROGVER).darwin-amd64
GOOS=linux GOARCH=amd64 go build -o ./OPATH/trickster-$(PROGVER).linux-amd64 && gzip -f ./OPATH/trickster-$(PROGVER).linux-amd64
helm-local:
kubectl config use-context minikube --namespace=trickster
kubectl scale --replicas=0 deployment/dev-trickster -n trickster
eval $$(minikube docker-env) \
&& docker build -f deploy/Dockerfile -t trickster:dev .
kubectl set image deployment/dev-trickster trickster=trickster:dev -n trickster
kubectl scale --replicas=1 deployment/dev-trickster -n trickster
kube-local:
kubectl config use-context minikube
kubectl scale --replicas=0 deployment/trickster
eval $$(minikube docker-env) \
&& docker build -f deploy/Dockerfile -t trickster:dev .
kubectl set image deployment/trickster trickster=trickster:dev
kubectl scale --replicas=1 deployment/trickster
docker:
docker build -f ./deploy/Dockerfile -t trickster:$(PROGVER) .
docker-release:
docker tag trickster:$(PROGVER) tricksterio/trickster:$(PROGVER)
docker tag tricksterio/trickster:$(PROGVER) tricksterio/trickster:latest
clean:
rm ${GOPATH}/bin/trickster
.PHONY: build helm-local kube-local docker docker-release clean deps