update makefile for circleci image upload

This commit is contained in:
Jeffrey Paul 2019-10-27 06:42:11 -07:00
parent 69aa773ba3
commit 30e5760cf6
1 changed files with 7 additions and 10 deletions

View File

@ -1,6 +1,6 @@
APPNAME := merp
VERSION := $(shell git rev-parse --short HEAD)
VERSION := $(shell git rev-parse HEAD)
BUILDTIME := $(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
BUILDUSER := $(shell whoami)
BUILDHOST := $(shell hostname -s)
@ -52,17 +52,14 @@ dist: build-docker-image
hub: upload-docker-image
build-docker-image:
docker build \
-t $(IMAGENAME):$(VERSION) \
-t $(IMAGENAME):latest \
-t $(IMAGENAME):$(BUILDTIMETAG) \
.
docker build -t $(IMAGENAME) .
upload-docker-image: build-docker-image
docker push $(IMAGENAME):$(VERSION)
docker tag $(IMAGENAME) $(IMAGENAME):$(BUILDTIMETAG)
docker push $(IMAGENAME):$(BUILDTIMETAG)
docker push $(IMAGENAME):latest
ci-upload-images:
docker push $(IMAGENAME):$(VERSION)
docker push $(IMAGENAME):$(BUILDTIMETAG)
docker tag $(IMAGENAME) $(IMAGENAME):$(CIRCLE_SHA1)
docker tag $(IMAGENAME) $(IMAGENAME):$(CIRCLE_BRANCH)
docker push $(IMAGENAME):$(CIRCLE_SHA1)
docker push $(IMAGENAME):$(CIRCLE_BRANCH)