Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit 5d658a0

Browse files
authored
Merge pull request #9 from microservices-demo/CD-style-docker-push
Push docker images in CD style
2 parents 820b5f7 + 474937b commit 5d658a0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

push.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,9 @@ tag_and_push_all() {
3939
push "$DOCKER_REPO:$TAG";
4040
}
4141

42-
# Always push commit
43-
tag_and_push_all $COMMIT
44-
4542
# Push snapshot when in master
46-
if [ "$TRAVIS_BRANCH" == "master" ]; then
47-
tag_and_push_all snapshot
43+
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
44+
tag_and_push_all master-${COMMIT:0:8}
4845
fi;
4946

5047
# Push tag and latest when tagged

0 commit comments

Comments
 (0)