Skip to content

Commit

Permalink
ci: fixes image builds to push tagged builds (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
prydonius authored Apr 29, 2018
1 parent e8bdee6 commit 47637c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ jobs:
script: make VERSION="$VERSION" $IMAGE
after_success:
- |
if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "master" ]]; then
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
if [[ -n "$TRAVIS_TAG" ]]; then
docker push $IMAGE:$VERSION
fi
docker tag $IMAGE:$VERSION $IMAGE:latest
docker push $IMAGE:latest
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
docker tag $IMAGE:$VERSION $IMAGE:latest
docker push $IMAGE:latest
fi
fi
- <<: *imageBuild
env: IMAGE=kubeapps/chartsvc
Expand Down

0 comments on commit 47637c0

Please sign in to comment.