Only creates Docker tag for branch

This commit is contained in:
Aaron Louie 2020-05-14 08:55:10 -04:00
parent 2128fd26ed
commit 4e9afc1b6d
1 changed files with 1 additions and 5 deletions

View File

@ -14,7 +14,6 @@ function branch_to_deploy_stage () {
REPO="sartography/cr-connect-bpmn"
TAG=$(branch_to_tag "$TRAVIS_BRANCH")
COMMIT=${TRAVIS_COMMIT::8}
DEPLOY_APP="bpmn"
DEPLOY_GROUP=$(branch_to_deploy_group "$TRAVIS_BRANCH")
@ -29,14 +28,11 @@ fi
DEPLOY_PATH="$DEPLOY_GROUP/$DEPLOY_STAGE/$DEPLOY_APP"
echo "REPO = $REPO"
echo "TAG = $TAG"
echo "COMMIT = $COMMIT"
echo "DEPLOY_PATH = $DEPLOY_PATH"
# Build and push Docker image to Docker Hub
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin || exit 1
docker build -f Dockerfile -t "$REPO:$COMMIT" . || exit 1
docker tag "$REPO:$COMMIT" "$REPO:$TAG" || exit 1
docker tag "$REPO:$COMMIT" "$REPO:travis-$TRAVIS_BUILD_NUMBER" || exit 1
docker build -f Dockerfile -t "$REPO:$TAG" . || exit 1
docker push "$REPO" || exit 1
# Wait for Docker Hub