Skip to content

Commit

Permalink
Merge pull request #8 from devilbox/release-0.14
Browse files Browse the repository at this point in the history
Fix docker login
  • Loading branch information
cytopia authored Apr 12, 2018
2 parents b87ecab + 7239db3 commit 1b4ee3a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,17 @@ jobs:
script:
# Push to docker hub on success
- if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin &&
if [ -n "${TRAVIS_TAG}" ]; then
docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD" &&
echo "Pushing ${IMAGE}:${TRAVIS_TAG}" &&
docker push "${IMAGE}:${TRAVIS_TAG}" &&
docker tag "${IMAGE}:${TRAVIS_TAG}" "${IMAGE}:latest" &&
echo "Pushing ${IMAGE}:latest" &&
docker push "${IMAGE}:latest";
elif [ "${TRAVIS_BRANCH}" == "master" ]; then
docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD" &&
echo "Pushing ${IMAGE}:latest" &&
docker push "${IMAGE}:latest";
elif [[ ${TRAVIS_BRANCH} =~ ^(release[/-][.0-9]+)$ ]]; then
docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD" &&
echo "Pushing ${IMAGE}:${TRAVIS_BRANCH}" &&
docker push "${IMAGE}:${TRAVIS_BRANCH}";
else
Expand Down

0 comments on commit 1b4ee3a

Please sign in to comment.