diff options
| author | Gaëtan Gilbert | 2020-11-26 15:04:30 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2020-11-26 15:10:07 +0100 |
| commit | ea795d144c59facfcfa1837fdce3ca654b159d58 (patch) | |
| tree | 0763ac903587072464f64e88e77f40c6754c13c7 /dev/tools | |
| parent | 7f3c46acc937eb9257c29b5881e5a8b17b28cd48 (diff) | |
CI: Use hash of dockerfile in CACHEKEY
Checked by the linter so we don't forget to update it.
Also checked by before_script so we don't run jobs for nothing.
Diffstat (limited to 'dev/tools')
| -rwxr-xr-x | dev/tools/check-cachekey.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dev/tools/check-cachekey.sh b/dev/tools/check-cachekey.sh new file mode 100755 index 0000000000..15e3fa93cb --- /dev/null +++ b/dev/tools/check-cachekey.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +hash=$(md5sum dev/ci/docker/bionic_coq/Dockerfile | head -c 10) +key=$(grep CACHEKEY: .gitlab-ci.yml) +keyhash=${key%\"} +keyhash=${keyhash##*-} +if ! [ "$hash" = "$keyhash" ]; then + echo "Bad CACHEKEY: expected '$hash' but got '$keyhash'" + exit 1 +fi |
