Skip to content

Commit 71bb21a

Browse files
author
Vladimir Kotal
committed
check Docker variables
1 parent b505526 commit 71bb21a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

dev/docker.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,26 @@ set -e
1515

1616
# Travis can only work on master since it needs encrypted variables.
1717
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
18-
print "Not build docker image for pull requests"
18+
echo "Not building docker image for pull requests"
1919
exit 0
2020
fi
2121

2222
# Allow Docker builds for release builds only.
2323
if [[ -z $TRAVIS_TAG ]]; then
24-
print "TRAVIS_TAG is empty"
24+
echo "TRAVIS_TAG is empty"
2525
exit 0
2626
fi
2727

28+
if [[ -z $DOCKER_USERNAME ]]; then
29+
echo "DOCKER_USERNAME is empty"
30+
exit 1
31+
fi
32+
33+
if [[ -z $DOCKER_PASSWORD ]]; then
34+
echo "DOCKER_PASSWORD is empty"
35+
exit 1
36+
fi
37+
2838
VERSION="$TRAVIS_TAG"
2939

3040
# Build the image.

0 commit comments

Comments
 (0)