diff --git a/.travis.yml b/.travis.yml index fc7cf71750..f585aab3b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,9 +20,9 @@ install: true script: # build initContainer - - make docker-build-initContainer || travis_terminate 1; + - make initContainer || travis_terminate 1; # build kyverno container - - make docker-build-kyverno || travis_terminate 1; + - make kyverno || travis_terminate 1; # tests - make test-all || travis_terminate 1; diff --git a/Makefile b/Makefile index 16d2e0204a..ad05782135 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,7 @@ TIMESTAMP := $(shell date '+%Y-%m-%d_%I:%M:%S%p') ################################## KYVERNO_PATH:= cmd/kyverno -build: - GOOS=$(GOOS) go build -o $(PWD)/$(KYVERNO_PATH)/kyverno -ldflags=$(LD_FLAGS) $(PWD)/$(KYVERNO_PATH)/main.go +build: kyverno ################################## # INIT CONTAINER @@ -52,10 +51,13 @@ docker-push-initContainer: .PHONY: docker-build-kyverno docker-tag-repo-kyverno docker-push-kyverno KYVERNO_PATH := cmd/kyverno KYVERNO_IMAGE := kyverno +kyverno: + GOOS=$(GOOS) go build -o $(PWD)/$(KYVERNO_PATH)/kyverno -ldflags=$(LD_FLAGS) $(PWD)/$(KYVERNO_PATH)/main.go + docker-publish-kyverno: docker-build-kyverno docker-tag-repo-kyverno docker-push-kyverno docker-build-kyverno: - GO_ENABLED=0 GOOS=linux go build -o $(PWD)/$(KYVERNO_PATH)/kyverno -ldflags=$(LD_FLAGS) $(PWD)/$(KYVERNO_PATH)/main.go + CGO_ENABLED=0 GOOS=linux go build -o $(PWD)/$(KYVERNO_PATH)/kyverno -ldflags=$(LD_FLAGS) $(PWD)/$(KYVERNO_PATH)/main.go @docker build -f $(PWD)/$(KYVERNO_PATH)/Dockerfile -t $(REGISTRY)/nirmata/$(KYVERNO_IMAGE):$(IMAGE_TAG) $(PWD)/$(KYVERNO_PATH) docker-tag-repo-kyverno: