From 4d43616ca20b935ee94f31bef0b93ab47f27d41a Mon Sep 17 00:00:00 2001 From: Alexandru Giurgiu Date: Wed, 18 Jan 2017 21:47:27 +0200 Subject: [PATCH] - removed the line that pushes for any commit - changed Docker tag for pushes from the master branch. The pushed Docker tag now contains tag of form: "master-<8 char commit SHA>" - the tag pusing remains the same. Related to microservices-demo/microservices-demo#553 --- scripts/push.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/push.sh b/scripts/push.sh index e993474f..b29990df 100755 --- a/scripts/push.sh +++ b/scripts/push.sh @@ -40,12 +40,9 @@ tag_and_push_all() { done; } -# Always push commit -tag_and_push_all $COMMIT - # Push snapshot when in master -if [ "$TRAVIS_BRANCH" == "master" ]; then - tag_and_push_all snapshot +if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + tag_and_push_all master-${COMMIT:0:8} fi; # Push tag and latest when tagged