diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2018-09-23 01:40:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-23 01:40:09 +0200 |
commit | 0c9b9837990b6404e78e4a16452b4c4b239ebe2a (patch) | |
tree | 45f779908058378c8c5d240ebb4ba2b92ea5cdc1 | |
parent | 644307a4a5cab23fd858c2e140705c957b5be9a0 (diff) | |
parent | 2073dd31cc222122b6ca0636b83614912372441d (diff) |
Merge pull request #4252 from paulfantom/fail_fast
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 |