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
|
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')
|
BUILDTIME := $(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
|
||||||
BUILDUSER := $(shell whoami)
|
BUILDUSER := $(shell whoami)
|
||||||
BUILDHOST := $(shell hostname -s)
|
BUILDHOST := $(shell hostname -s)
|
||||||
|
@ -52,17 +52,14 @@ dist: build-docker-image
|
||||||
hub: upload-docker-image
|
hub: upload-docker-image
|
||||||
|
|
||||||
build-docker-image:
|
build-docker-image:
|
||||||
docker build \
|
docker build -t $(IMAGENAME) .
|
||||||
-t $(IMAGENAME):$(VERSION) \
|
|
||||||
-t $(IMAGENAME):latest \
|
|
||||||
-t $(IMAGENAME):$(BUILDTIMETAG) \
|
|
||||||
.
|
|
||||||
|
|
||||||
upload-docker-image: build-docker-image
|
upload-docker-image: build-docker-image
|
||||||
docker push $(IMAGENAME):$(VERSION)
|
docker tag $(IMAGENAME) $(IMAGENAME):$(BUILDTIMETAG)
|
||||||
docker push $(IMAGENAME):$(BUILDTIMETAG)
|
docker push $(IMAGENAME):$(BUILDTIMETAG)
|
||||||
docker push $(IMAGENAME):latest
|
|
||||||
|
|
||||||
ci-upload-images:
|
ci-upload-images:
|
||||||
docker push $(IMAGENAME):$(VERSION)
|
docker tag $(IMAGENAME) $(IMAGENAME):$(CIRCLE_SHA1)
|
||||||
docker push $(IMAGENAME):$(BUILDTIMETAG)
|
docker tag $(IMAGENAME) $(IMAGENAME):$(CIRCLE_BRANCH)
|
||||||
|
docker push $(IMAGENAME):$(CIRCLE_SHA1)
|
||||||
|
docker push $(IMAGENAME):$(CIRCLE_BRANCH)
|
||||||
|
|
Loading…
Reference in New Issue