aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-23 09:41:07 -0800
committerGravatar MarkKoz <[email protected]>2020-02-23 09:41:23 -0800
commit226413a9705aa8119a0b8f66418b7e02ab76cb65 (patch)
treecac8d7d53e3e32e3f20125662ceef4604ab0303c
parentCI: output flake8 to stdout (resolve #37) (diff)
CI: fix can_pull causing script to exit with code 1
Error handling is performed inside can_pull so the callers of the function don't always check its exit code. Because set -e present, if can_pull returns 1, bash would consider that function a failed call and thus exit the entire script with code 1. That, in turn, would cause the CI job to fail.
-rwxr-xr-xscripts/check_dockerfiles.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/check_dockerfiles.sh b/scripts/check_dockerfiles.sh
index 95c18cb..88cb7cc 100755
--- a/scripts/check_dockerfiles.sh
+++ b/scripts/check_dockerfiles.sh
@@ -115,7 +115,7 @@ if git diff --quiet "${prev_commit}" -- docker/venv.Dockerfile Pipfile*; then
if ! can_pull venv docker/venv.Dockerfile Pipfile*; then
# Venv image can't be pulled so it needs to be built.
# Therefore, the base image is needed too.
- can_pull base docker/base.Dockerfile
+ can_pull base docker/base.Dockerfile || true
fi
else
echo \
@@ -123,5 +123,5 @@ else
"the venv image will be built."
# Though base image hasn't changed, it's still needed to build the venv.
- can_pull base docker/base.Dockerfile
+ can_pull base docker/base.Dockerfile || true
fi