forked from volcano-sh/kubegene
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (25 loc) · 764 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
.PHONY: all kube-dag genectl clean test e2e
IMAGE_NAME=kube-dag
TAG=$(shell git rev-parse --short HEAD)
ifdef V
TESTARGS = -v -args -alsologtostderr -v 10
else
TESTARGS =
endif
all: kube-dag genectl
kube-dag:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./bin/kube-dag ./cmd/kube-dag
genectl:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./bin/genectl ./cmd/genectl
clean:
-rm -rf bin
docker: kube-dag
docker build -t $(IMAGE_NAME):$(TAG) .
test:
go test `go list ./... | grep -v -e 'vendor' -e 'test'` $(TESTARGS)
go vet `go list ./... | grep -v vendor`
e2e: KUBECONFIG?=$(HOME)/.kube/config
e2e:
./hack/e2e.sh $(IMAGE_NAME):$(TAG) $(KUBECONFIG) ./bin/genectl