2016-07-07 01:40:58 -07:00
|
|
|
#BUILD_VERBOSE :=
|
|
|
|
|
BUILD_VERBOSE := -v
|
|
|
|
|
|
|
|
|
|
TEST_VERBOSE :=
|
2016-07-14 14:50:14 -07:00
|
|
|
TEST_VERBOSE := -v
|
2016-06-06 12:49:53 -07:00
|
|
|
|
2016-08-05 18:19:51 -07:00
|
|
|
DOCKER_IMAGE_NAME := $$USER/coredns
|
|
|
|
|
|
|
|
|
|
|
2016-04-13 20:14:13 +01:00
|
|
|
all:
|
2016-08-05 18:19:51 -07:00
|
|
|
go build $(BUILD_VERBOSE) -ldflags="-s -w"
|
2016-04-13 20:14:13 +01:00
|
|
|
|
|
|
|
|
.PHONY: docker
|
2016-08-05 18:19:51 -07:00
|
|
|
docker: all
|
|
|
|
|
GOOS=linux go build -a -tags netgo -installsuffix netgo -ldflags="-s -w"
|
|
|
|
|
docker build -t $(DOCKER_IMAGE_NAME) .
|
2016-04-28 11:07:44 -07:00
|
|
|
|
|
|
|
|
.PHONY: deps
|
|
|
|
|
deps:
|
2016-07-07 01:40:58 -07:00
|
|
|
go get ${BUILD_VERBOSE}
|
2016-04-28 11:07:44 -07:00
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
|
test:
|
2016-07-07 01:40:58 -07:00
|
|
|
go test $(TEST_VERBOSE) ./...
|
2016-04-28 11:07:44 -07:00
|
|
|
|
2016-07-14 14:50:14 -07:00
|
|
|
.PHONY: testk8s
|
|
|
|
|
testk8s:
|
2016-08-05 18:19:51 -07:00
|
|
|
# With -args --v=100 the k8s API response data will be printed in the log:
|
|
|
|
|
#go test $(TEST_VERBOSE) -tags=k8s -run 'TestK8sIntegration' ./test -args --v=100
|
|
|
|
|
# Without the k8s API response data:
|
2016-07-27 10:01:24 -07:00
|
|
|
go test $(TEST_VERBOSE) -tags=k8s -run 'TestK8sIntegration' ./test
|
2016-07-14 14:50:14 -07:00
|
|
|
|
2016-08-05 18:19:51 -07:00
|
|
|
.PHONY: testk8s-setup
|
|
|
|
|
testk8s-setup:
|
|
|
|
|
go test -v ./core/setup -run TestKubernetes
|
|
|
|
|
|
2016-04-28 11:07:44 -07:00
|
|
|
.PHONY: clean
|
|
|
|
|
clean:
|
|
|
|
|
go clean
|