update makefile for circleci image upload
This commit is contained in:
parent
69aa773ba3
commit
30e5760cf6
17
Makefile
17
Makefile
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue