-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 968 Bytes
/
Makefile
File metadata and controls
38 lines (29 loc) · 968 Bytes
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
ORGANIZATION=hyperpilot
IMAGE=deployer
TAG=latest
INCLUSTER_TAG=in-cluster
GLIDE=$(which glide)
GO_EXECUTABLE ?= go
# For windows developer, use $(go list ./... | grep -v /vendor/)
PACKAGES=$(glide novendor)
init:
glide install
test:
${GO_EXECUTABLE} test ${PACKAGES} -v
dev-test: build
./deployer --config ./documents/dev.config -logtostderr=true -v=2
build:
CGO_ENABLED=0 go build -a -installsuffix cgo
build-linux:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo
complete-build-linux: init build-linux
docker-build:
sed -i.bak 's/"inCluster.*/"inCluster": false,/g' documents/deployed.config
docker build . -t ${ORGANIZATION}/${IMAGE}:${TAG}
docker-build-incluster:
sed -i.bak 's/"inCluster.*/"inCluster": true,/g' documents/deployed.config
docker build . -t ${ORGANIZATION}/${IMAGE}:${INCLUSTER_TAG}
docker-push:
docker push ${ORGANIZATION}/${IMAGE}:${TAG}
gcp-create-service-account-file:
./build_gcp_serviceAccoutFile.sh