-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
21 lines (17 loc) · 802 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#------------------------------------------------------------------
# Project build information
#------------------------------------------------------------------
#------------------------------------------------------------------
# CI targets
#------------------------------------------------------------------
build:
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VERSION=`cat VERSION` \
-t $(IMAGE_NAME):latest .
publish:
echo "$(DOCKERHUB_PASS)" | docker login -u "$(DOCKERHUB_USERNAME)" --password-stdin
IMAGE_TAG="0.0.$(CIRCLE_BUILD_NUM)"
docker tag $(IMAGE_NAME):latest $(IMAGE_NAME):${IMAGE_TAG}
docker push $(IMAGE_NAME):latest
docker push $(IMAGE_NAME):${IMAGE_TAG}