Add optional image push to Makefile

- When building an image, optionally also push
  that image if PUSH_IMAGE=true
- Default value to false

Change-Id: I206e0261624b8a286d83e86bdb493e003887c8e6
This commit is contained in:
Scott Hussey 2018-01-18 12:45:40 -06:00
parent b70f920b53
commit f9c6a34a23
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,7 @@ IMAGE_TAG ?= latest
HELM ?= helm
PROXY ?= http://one.proxy.att.com:8080
USE_PROXY ?= false
PUSH_IMAGE ?= false
export
@ -68,6 +69,10 @@ ifeq ($(USE_PROXY), true)
else
docker build -t $(IMAGE_PREFIX)/$(DRYDOCK_IMAGE_NAME):$(IMAGE_TAG) -f images/drydock/Dockerfile .
endif
ifeq ($(PUSH_IMAGE), true)
docker push $(IMAGE_PREFIX)/$(DRYDOCK_IMAGE_NAME):$(IMAGE_TAG)
endif
.PHONY: clean
clean: