Switch to test pt. 2

This commit is contained in:
Sandro Jäckel 2019-07-06 16:56:59 +02:00
parent 4afbed52c8
commit 95766e90c9
No known key found for this signature in database
GPG Key ID: 236B6291555E8401

View File

@ -33,7 +33,7 @@ else
TAGS="$DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT" TAGS="$DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
fi fi
if [[ -n $EXTRA_TAG ]]; then if [[ -n ${EXTRA_TAG:-} ]]; then
TAGS="$TAGS -t $DOCKER_REPO:$EXTRA_TAG" TAGS="$TAGS -t $DOCKER_REPO:$EXTRA_TAG"
fi fi
fi fi
@ -55,21 +55,21 @@ if [[ $(dirname "$(git diff --name-only HEAD^)") =~ $VERSION_SHORT ]] && [[ $TRA
fi fi
# push a tag on a branch other than master # push a tag on a branch other than master
if [[ -n "$TRAVIS_BRANCH" ]] && [[ "$TRAVIS_BRANCH" != "${VERSION%-*}" ]] && [[ "$TRAVIS_BRANCH" != "master" ]]; then if [[ -n $TRAVIS_BRANCH ]] && [[ $TRAVIS_BRANCH != "${VERSION%-*}" ]] && [[ $TRAVIS_BRANCH != "master" ]]; then
docker push "$DOCKER_REPO:$TRAVIS_BRANCH" docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
fi fi
# push an incremental tag # push an incremental tag
if [[ "$TRAVIS_BRANCH" != "${VERSION%-*}" ]]; then if [[ $TRAVIS_BRANCH != "${VERSION%-*}" ]]; then
docker push "$DOCKER_REPO:$TRAVIS_BRANCH" docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
fi fi
if [[ -n "$TRAVIS_TAG" ]] || [[ "$CI" == "" ]]; then if [[ -n $TRAVIS_TAG ]] || [[ $CI == "" ]]; then
docker push "$DOCKER_REPO:$VERSION" docker push "$DOCKER_REPO:$VERSION"
docker push "$DOCKER_REPO:$VERSION_SHORT" docker push "$DOCKER_REPO:$VERSION_SHORT"
fi fi
if [[ -n "$EXTRA_TAG" ]]; then if [[ -n ${EXTRA_TAG:-} ]]; then
docker push "$DOCKER_REPO:$EXTRA_TAG" docker push "$DOCKER_REPO:$EXTRA_TAG"
fi fi