diff options
author | paulfantom <pawel@krupa.net.pl> | 2018-09-22 15:22:00 +0200 |
---|---|---|
committer | paulfantom <pawel@krupa.net.pl> | 2018-09-22 15:22:00 +0200 |
commit | 2073dd31cc222122b6ca0636b83614912372441d (patch) | |
tree | 4c6bb2e3dc087bf3b2031e637830f3ef6806ba70 | |
parent | 94b054e163249723a6b3b70d39a1ca618bd7c6b1 (diff) |
fail fast in docker builds
-rwxr-xr-x | docker/build.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docker/build.sh b/docker/build.sh index 8ba7050890..7a3e50dc5f 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -3,6 +3,8 @@ # author : paulfantom # Cross-arch docker build helper script +set +e + REPOSITORY="${REPOSITORY:-netdata}" if [ ${VERSION+x} ]; then @@ -25,11 +27,11 @@ docker tag "${REPOSITORY}:${ARCH}${VERSION}" "${REPOSITORY}:latest" # Push images to registry if [ -z ${DOCKER_USERNAME+x} ]; then echo "No docker hub username specified. Exiting without pushing images to registry" - exit 0 + exit 1 fi if [ -z ${DOCKER_PASSWORD+x} ]; then echo "No docker hub password specified. Exiting without pushing images to registry" - exit 0 + exit 1 fi echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin for ARCH in amd64 i386 armhf aarch64; do |