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

Commit

Permalink
- removed the line that pushes for any commit
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
nustiueudinastea committed Jan 18, 2017
1 parent 820b5f7 commit 14cb270
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,18 @@ tag_and_push_all() {
else
TAG=$1
fi
DOCKER_REPO=${GROUP}/${REPO}
if [[ "$COMMIT" != "$TAG" ]]; then
echo "Tagging docker release"
docker tag ${DOCKER_REPO}:${COMMIT} ${DOCKER_REPO}:${TAG}
fi
push "$DOCKER_REPO:$TAG";
for m in ./docker/*/; do
REPO=${GROUP}/$(basename $m)
if [[ "$COMMIT" != "$TAG" ]]; then
docker tag ${REPO}:${COMMIT} ${REPO}:${TAG}
fi
push "$REPO:$TAG";
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
Expand Down

0 comments on commit 14cb270

Please sign in to comment.