paperless-ng: check exit status of docker build

This commit is contained in:
Starbeamrainbowlabs 2021-01-14 21:15:40 +00:00
parent 74b071c7ec
commit 82c7788067
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -9,7 +9,7 @@ output_dir="${1}";
log_msg() { log_msg() {
# echo "[github-get-releases] [${SECONDS}] $*" >&2; # echo "[github-get-releases] [${SECONDS}] $*" >&2;
echo "[docker-images/paperless-ng] $*" >&2; echo -e "[docker-images/paperless-ng] $*" >&2;
} }
if [[ -z "${output_dir}" ]]; then if [[ -z "${output_dir}" ]]; then
@ -75,6 +75,9 @@ docker_tag="${IMAGEBUILDER_REGISTRY}/paperless-ng";
log_msg "Building docker image"; log_msg "Building docker image";
docker build --no-cache --pull --tag "${docker_tag}" .; docker build --no-cache --pull --tag "${docker_tag}" .;
if [[ "$?" -ne 0 ]]; then
log_msg "Error: docker build returned exit status $?";
fi
log_msg "Pushing docker image"; log_msg "Pushing docker image";
docker push "${docker_tag}"; docker push "${docker_tag}";