ignore cache_get failure
@@ -10,7 +10,7 @@ Arguments:
- build: Build a docker image used for testing.
- push: Push the built docker image so that further test runs can reuse
the image.
- - cache_get: Pull cache from Google Cloud Storage to CACHE_DIR.
+ - cache_get: Pull cache from Google Cloud Storage to CACHE_DIR if available.
- cache_put: Push cache from CACHE_DIR to Google Cloud Storage.
- test: Run tests.
@@ -83,9 +83,9 @@ main() {
exit 1
fi
mkdir -p "${CACHE_DIR}"
- gsutil -m -q cp "${cache_gcs_dir}/${cache_archive}" .
- tar -x -f "${cache_archive}" -C "${CACHE_DIR}"
- rm -f "${cache_archive}"
+ gsutil -m -q cp "${cache_gcs_dir}/${cache_archive}" . &&
+ tar -x -f "${cache_archive}" -C "${CACHE_DIR}" &&
+ rm -f "${cache_archive}" || echo "WARNING: Remote cache could not be retrieved."
;;
cache_put )
