Skip to content

Commit

Permalink
companion: fixes docker version tagging. fixes transloadit#1579.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhartstonge committed Jun 30, 2020
1 parent 8bdded7 commit c186dfd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions infra/kube/gcloud-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ mv ./kubectl ${HOME}/.local/bin/
docker build -t transloadit/companion:latest -t transloadit/companion:$TRAVIS_COMMIT -f packages/@uppy/companion/Dockerfile packages/@uppy/companion;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";

if [[ -z "${TRAVIS_TAG}" ]]; then
docker push transloadit/companion:$TRAVIS_COMMIT;
else
# Push the commit tagged docker image.
docker push transloadit/companion:$TRAVIS_COMMIT;

# If this build includes a git tag, tag the image with the git version tag and push the version.
if [[ ! -z "${TRAVIS_TAG}" ]]; then
docker tag transloadit/companion:$TRAVIS_COMMIT transloadit/companion:$TRAVIS_TAG;
docker push transloadit/companion:$TRAVIS_TAG;
fi

# Lastly, update the pointer to latest.
docker push transloadit/companion:latest;


Expand All @@ -49,4 +53,4 @@ function cleanup {
printf "Cleaning done."
}

trap cleanup EXIT
trap cleanup EXIT

0 comments on commit c186dfd

Please sign in to comment.