-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (16 loc) · 819 Bytes
/
Makefile
File metadata and controls
21 lines (16 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tag=latest
build: buildgo
docker build -t robinjmurphy/kubernetes-example-service-a:$(tag) ./service-a
docker build -t robinjmurphy/kubernetes-example-service-b:$(tag) ./service-b
docker build -t robinjmurphy/kubernetes-example-service-c:$(tag) ./service-c
buildgo: clean
cd service-a && CGO_ENABLED=0 GOOS=linux go build -ldflags "-s" -a -installsuffix cgo -o main
cd service-b && CGO_ENABLED=0 GOOS=linux go build -ldflags "-s" -a -installsuffix cgo -o main
cd service-c && CGO_ENABLED=0 GOOS=linux go build -ldflags "-s" -a -installsuffix cgo -o main
clean:
rm -f service-{a,b,c}/main
push:
docker push robinjmurphy/kubernetes-example-service-a:$(tag)
docker push robinjmurphy/kubernetes-example-service-b:$(tag)
docker push robinjmurphy/kubernetes-example-service-c:$(tag)
.PHONY: buildgo build push