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

Commit 14cb270

Browse files
- 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
1 parent 820b5f7 commit 14cb270

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

push.sh

+9-11
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,18 @@ tag_and_push_all() {
3131
else
3232
TAG=$1
3333
fi
34-
DOCKER_REPO=${GROUP}/${REPO}
35-
if [[ "$COMMIT" != "$TAG" ]]; then
36-
echo "Tagging docker release"
37-
docker tag ${DOCKER_REPO}:${COMMIT} ${DOCKER_REPO}:${TAG}
38-
fi
39-
push "$DOCKER_REPO:$TAG";
34+
for m in ./docker/*/; do
35+
REPO=${GROUP}/$(basename $m)
36+
if [[ "$COMMIT" != "$TAG" ]]; then
37+
docker tag ${REPO}:${COMMIT} ${REPO}:${TAG}
38+
fi
39+
push "$REPO:$TAG";
40+
done;
4041
}
4142

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

5048
# Push tag and latest when tagged

0 commit comments

Comments
 (0)