Skip to content

Commit

Permalink
Prefer passed in branch over $TRAVIS_BRANCH (#1265)
Browse files Browse the repository at this point in the history
This allows us to call the script using `master` instead of worrying about what branch this is actually being executed on
  • Loading branch information
clekstro committed Aug 28, 2017
1 parent 81c091a commit 23690c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/docker-build-and-push
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ docker images;

local_image=travisweb_web;
quay_image=quay.io/travisci/travis-web;
branch=${1:-${TRAVIS_BRANCH}}

docker tag $local_image $quay_image:$TRAVIS_BRANCH;
docker push $quay_image:$TRAVIS_BRANCH;
docker tag $local_image $quay_image:$branch;
docker push $quay_image:$branch;

docker tag $local_image $quay_image:${TRAVIS_COMMIT:0:7};
docker push $quay_image:${TRAVIS_COMMIT:0:7};

docker tag $local_image $quay_image:latest;
docker push $quay_image:$TRAVIS_BRANCH;
docker push $quay_image:$branch;

0 comments on commit 23690c0

Please sign in to comment.