@cryptotaxi247 / netdata-1 / commits / 2073dd31c

fail fast in docker builds

paulfantom committed Sep 22, 2018 at 15:22 UTC 2073dd31cc222122b6ca0636b83614912372441d
1 file changed +4 -2
docker/build.sh
+4 -2
@@ -3,6 +3,8 @@
3 # author : paulfantom
4 # Cross-arch docker build helper script
5
6 +set +e
7 +
8 REPOSITORY="${REPOSITORY:-netdata}"
9
10 if [ ${VERSION+x} ]; then
@@ -25,11 +27,11 @@ docker tag "${REPOSITORY}:${ARCH}${VERSION}" "${REPOSITORY}:latest"
27 # Push images to registry
28 if [ -z ${DOCKER_USERNAME+x} ]; then
29 echo "No docker hub username specified. Exiting without pushing images to registry"
28 - exit 0
30 + exit 1
31 fi
32 if [ -z ${DOCKER_PASSWORD+x} ]; then
33 echo "No docker hub password specified. Exiting without pushing images to registry"
32 - exit 0
34 + exit 1
35 fi
36 echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
37 for ARCH in amd64 i386 armhf aarch64; do