ingress-nginx-helm/Makefile

73 lines
1.6 KiB
Makefile
Raw Normal View History

all: fmt lint vet
2016-11-11 01:45:20 +00:00
BUILDTAGS=
# building inside travis generates a custom version of the
# backends in order to run e2e tests agains the build.
ifdef TRAVIS_BUILD_ID
RELEASE := ci-build-${TRAVIS_BUILD_ID}
endif
# 0.0 shouldn't clobber any release builds
RELEASE?=0.0
# by default build a linux version
GOOS?=linux
REPO_INFO=$(shell git config --get remote.origin.url)
ifndef COMMIT
COMMIT := git-$(shell git rev-parse --short HEAD)
endif
# base package. It contains the common and backends code
PKG := "k8s.io/ingress"
2016-11-25 15:03:47 +00:00
GO_LIST_FILES=$(shell go list ${PKG}/... | grep -v vendor | grep -v -e "test/e2e")
2016-11-11 01:45:20 +00:00
.PHONY: fmt
fmt:
@go list -f '{{if len .TestGoFiles}}"gofmt -s -l {{.Dir}}"{{end}}' ${GO_LIST_FILES} | xargs -L 1 sh -c
.PHONY: lint
lint:
2016-11-25 15:03:47 +00:00
@go list -f '{{if len .TestGoFiles}}"golint -min_confidence=0.85 {{.Dir}}/..."{{end}}' ${GO_LIST_FILES} | xargs -L 1 sh -c
2016-11-11 01:45:20 +00:00
.PHONY: test
test:
@go test -v -race -tags "$(BUILDTAGS) cgo" ${GO_LIST_FILES}
.PHONY: test-e2e
test-e2e: ginkgo
@go run hack/e2e.go -v --up --test --down
.PHONY: cover
cover:
@go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ${GO_LIST_FILES} | xargs -L 1 sh -c
gover
2016-11-24 02:18:48 +00:00
goveralls -coverprofile=gover.coverprofile -service travis-ci
2016-11-11 01:45:20 +00:00
.PHONY: vet
vet:
@go vet ${GO_LIST_FILES}
.PHONY: clean
clean:
make -C controllers/nginx clean
.PHONY: controllers
controllers:
make -C controllers/nginx build
2016-12-15 12:50:02 +00:00
.PHONY: docker-build
docker-build: controllers
2016-11-11 01:45:20 +00:00
make -C controllers/nginx container
2016-12-15 12:50:02 +00:00
.PHONY: docker-push
docker-push: docker-build
make -C controllers/nginx push
2016-11-11 01:45:20 +00:00
.PHONY: ginkgo
ginkgo:
go get github.com/onsi/ginkgo/ginkgo