@@ 10,10 10,9 @@
# * The Go tarball, via `cacher download --url` fallback.
# * ~/go/pkg/mod, keyed on sha256(go.sum) — biggest win, the docker
# SDK transitives pulled in by testcontainers are heavy.
-# * The Garage docker image, via `cacher docker {exists,download,
-# upload}`. Switch to `cacher docker download --pull` after the
-# next release; the single-command form lives on master but
-# isn't in v0.1.0.
+# * The Garage docker image, via `cacher docker download --pull` —
+# single call that does cache HIT → docker load, or cache MISS →
+# docker pull + seed.
image: ubuntu/noble
packages:
- curl
@@ 90,16 89,8 @@ tasks:
- cache_garage_image: |
# Key derived from the image ref so a version bump invalidates
# the cache automatically: dxflrs/garage:v2.3.0 → dxflrs-garage-v2.3.0
- # stderr swallowed on `exists` because v0.1.0 still dumps the
- # cobra Usage block on a miss (SilenceUsage lands in the next
- # release).
KEY="docker/$(echo "$GARAGE_IMAGE" | tr '/:' '-').tar.zst"
- if cacher docker exists "$KEY" >/dev/null 2>&1; then
- cacher docker download "$KEY" "$GARAGE_IMAGE"
- else
- docker pull "$GARAGE_IMAGE"
- cacher docker upload "$KEY" "$GARAGE_IMAGE"
- fi
+ cacher docker download "$KEY" "$GARAGE_IMAGE" --pull
docker images "$GARAGE_IMAGE"
- test_e2e: |
cd ci-cacher