forked from kubernetes-retired/heapster
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
62 lines (49 loc) · 2.18 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
all: build
TAG = v1.2.0
PREFIX = gcr.io/google_containers
FLAGS =
SUPPORTED_KUBE_VERSIONS = "1.3.6"
TEST_NAMESPACE = heapster-e2e-tests
build: clean
docker run --rm \
-v ${PWD}:/go/src/k8s.io/heapster \
-w /go/src/k8s.io/heapster \
-e GOOS=linux \
-e GOARCH=amd64 \
-e CGO_ENABLED=0 \
-e GOPATH=/go \
cargo.caicloudprivatetest.com/caicloud/golang:1.9.2-alpine3.6 \
go build -i -v -o heapster ./metrics
docker run --rm \
-v ${PWD}:/go/src/k8s.io/heapster \
-w /go/src/k8s.io/heapster \
-e GOOS=linux \
-e GOARCH=amd64 \
-e CGO_ENABLED=0 \
-e GOPATH=/go \
cargo.caicloudprivatetest.com/caicloud/golang:1.9.2-alpine3.6 \
go build -i -v -o eventer ./events
sanitize:
hooks/check_boilerplate.sh
hooks/check_gofmt.sh
hooks/run_vet.sh
test-unit: clean deps sanitize build
GOOS=linux GOARCH=amd64 godep go test --test.short -race ./... $(FLAGS)
test-unit-cov: clean deps sanitize build
hooks/coverage.sh
test-integration: clean deps build
godep go test -v --timeout=60m ./integration/... --vmodule=*=2 $(FLAGS) --namespace=$(TEST_NAMESPACE) --kube_versions=$(SUPPORTED_KUBE_VERSIONS)
container: build
cp heapster deploy/docker/heapster
cp eventer deploy/docker/eventer
docker build -t $(PREFIX)/heapster:$(TAG) deploy/docker/
grafana:
docker build -t $(PREFIX)/heapster_grafana:$(TAG) grafana/
influxdb:
docker build -t $(PREFIX)/heapster_influxdb:$(TAG) influxdb/
clean:
rm -f heapster
rm -f eventer
rm -f deploy/docker/heapster
rm -f deploy/docker/eventer
.PHONY: all deps build sanitize test-unit test-unit-cov test-integration container grafana influxdb clean