mirror of
https://github.com/sartography/protocol-builder-mock.git
synced 2025-01-12 08:44:46 +00:00
Only creates Docker tag for branch
This commit is contained in:
parent
c05893130e
commit
9b43f5987a
@ -14,7 +14,6 @@ function branch_to_deploy_stage () {
|
||||
|
||||
REPO="sartography/protocol-builder-mock"
|
||||
TAG=$(branch_to_tag "$TRAVIS_BRANCH")
|
||||
COMMIT=${TRAVIS_COMMIT::8}
|
||||
|
||||
DEPLOY_APP="protocol-builder-mock"
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user