github.com/aclisp/heapster@v0.19.2-0.20160613100040-51756f899a96/Makefile (about)

     1  all: build
     2  
     3  TAG = v1.1.0-beta2
     4  PREFIX = gcr.io/google_containers
     5  FLAGS = 
     6  
     7  SUPPORTED_KUBE_VERSIONS = "1.2.4"
     8  TEST_NAMESPACE = heapster-e2e-tests
     9  
    10  deps:
    11  	go get github.com/tools/godep
    12  
    13  build: clean deps
    14  	GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build ./...
    15  	GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -o heapster k8s.io/heapster/metrics
    16  	GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -o eventer k8s.io/heapster/events
    17  
    18  sanitize:
    19  	hooks/check_boilerplate.sh
    20  	hooks/check_gofmt.sh
    21  	hooks/run_vet.sh
    22  
    23  test-unit: clean deps sanitize build
    24  	GOOS=linux GOARCH=amd64 godep go test --test.short -race ./... $(FLAGS)
    25  
    26  test-unit-cov: clean deps sanitize build
    27  	hooks/coverage.sh
    28  
    29  test-integration: clean deps build
    30  	godep go test -v --timeout=30m ./integration/... --vmodule=*=2 $(FLAGS) --namespace=$(TEST_NAMESPACE) --kube_versions=$(SUPPORTED_KUBE_VERSIONS)
    31  
    32  container: build
    33  	cp heapster deploy/docker/heapster
    34  	cp eventer deploy/docker/eventer
    35  	docker build -t $(PREFIX)/heapster:$(TAG) deploy/docker/
    36  
    37  grafana:
    38  	docker build -t $(PREFIX)/heapster_grafana:$(TAG) grafana/
    39  
    40  influxdb:
    41  	docker build -t $(PREFIX)/heapster_influxdb:$(TAG) influxdb/
    42  
    43  clean:
    44  	rm -f heapster
    45  	rm -f eventer
    46  	rm -f deploy/docker/heapster
    47  	rm -f deploy/docker/eventer
    48  
    49  .PHONY: all deps build sanitize test-unit test-unit-cov test-integration container grafana influxdb clean