Skip to content

Commit

Permalink
Merge pull request #81 from andyxning/fix_make_test_units
Browse files Browse the repository at this point in the history
fix make test units with cgo
  • Loading branch information
brancz authored Feb 14, 2017
2 parents a8f1d8f + dcc15d6 commit 7cb00cf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
all: build

FLAGS =
ENVVAR = GOOS=linux GOARCH=amd64 CGO_ENABLED=0
COMMONENVVAR = GOOS=linux GOARCH=amd64
BUILDENVVAR = CGO_ENABLED=0
TESTENVVAR =
REGISTRY = gcr.io/google_containers
TAG = v0.3.0

deps:
go get github.com/tools/godep

build: clean deps
$(ENVVAR) godep go build -o kube-state-metrics
$(COMMONENVVAR) $(BUILDENVVAR) godep go build -o kube-state-metrics

test-unit: clean deps build
$(ENVVAR) godep go test --race . $(FLAGS)
$(COMMONENVVAR) $(TESTENVVAR) godep go test --race . $(FLAGS)

container: build
docker build -t ${REGISTRY}/kube-state-metrics:$(TAG) .
Expand Down

0 comments on commit 7cb00cf

Please sign in to comment.