aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-12-16 15:19:46 -0800
committerGravatar MarkKoz <[email protected]>2020-02-21 21:45:24 -0800
commit98057a2f292478fd3526dd033c6d3b37a23bd71b (patch)
tree03fcd4ae48bff88f7e17e32ca65028c66ec123be
parentMerge pull request #62 from python-discord/bug/ci/61/python-symlink-not-resol... (diff)
CI: always check if the base image can be pulled from Docker Hub
-rwxr-xr-xscripts/check_dockerfiles.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/check_dockerfiles.sh b/scripts/check_dockerfiles.sh
index c84c61f..c2a7d47 100755
--- a/scripts/check_dockerfiles.sh
+++ b/scripts/check_dockerfiles.sh
@@ -74,13 +74,17 @@ fi
if git diff --quiet "${prev_commit}" -- docker/venv.Dockerfile Pipfile*; then
echo "No changes detected in docker/venv.Dockerfile or the Pipfiles."
echo "##vso[task.setvariable variable=VENV_CHANGED;isOutput=true]False"
-elif master_commit="$(
+fi
+
+# Though base image hasn't changed, it's still needed to build the venv.
+# Even if the venv hasn't changed, the dev venv image is still needed to run
+# the linter and tests. Therefore, the base image is also always needed.
+if master_commit="$(
get_build "refs/heads/master" \
| jq -re '.value[0].sourceVersion'
)" \
&& git diff --quiet "${master_commit}" -- docker/base.Dockerfile
then
- # Though base image hasn't changed, it's still needed to build the venv.
echo "Can pull base image from Docker Hub; no changes made since master."
echo "##vso[task.setvariable variable=BASE_PULL;isOutput=true]True"
fi