diff --git a/Makefile b/Makefile index 72ee04ca..ce90c650 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,7 @@ endif endif ifndef TAG override TAG=$(SHA) +override DO_NOT_PUBLISH=1 endif docker-build: set-tag @@ -94,12 +95,16 @@ docker-build: set-tag docker build -t $(IMAGE):$(TAG) -f ./admiral/docker/Dockerfile.admiral . docker-publish: +ifndef DO_NOT_PUBLISH echo "$(DOCKER_PASS)" | docker login -u $(DOCKER_USER) --password-stdin +endif ifeq ($(TAG),) echo "This is not a Tag/Release, skipping docker publish" else +ifndef DO_NOT_PUBLISH docker push $(IMAGE):$(TAG) endif +endif #no tag set and its master branch, in this case publish `latest` tag ifeq ($(TAG),) ifeq ($(BRANCH),master)