added revision hash

This commit is contained in:
Wyatt Johnson
2018-03-05 17:16:29 -07:00
parent 6a99a983c5
commit 09dcca27a8
4 changed files with 21 additions and 5 deletions
+10 -3
View File
@@ -54,9 +54,16 @@ deploy_branch() {
docker push coralproject/talk:$CIRCLE_BRANCH-onbuild
}
ARGS=""
if [[ -n "$CIRCLE_SHA1" ]]
then
ARGS="--build-arg REVISION_HASH=${CIRCLE_SHA1}"
fi
# build the repo, including the onbuild tagged versions.
docker build -t coralproject/talk:latest -f Dockerfile .
docker build -t coralproject/talk:latest-onbuild -f Dockerfile.onbuild .
docker build -t coralproject/talk:latest ${ARGS} -f Dockerfile .
docker build -t coralproject/talk:latest-onbuild ${ARGS} -f Dockerfile.onbuild .
if [ "$1" = "deploy" ]
then
@@ -80,4 +87,4 @@ then
deploy_branch
fi
fi
fi
fi