Bazel
Accelerate Bazel builds with Shipfox's colocated WebDAV remote cache
Bazel is a fast, scalable build system from Google used for large, multi-language codebases. Its remote caching feature stores build and test action outputs on a shared server so that any machine can skip work that has already been done elsewhere.
Shipfox provides a built-in WebDAV remote cache for Bazel on every runner at $SHIPFOX_BAZEL_URL. The cache is colocated with your runner, so cache reads and writes are fast and reliable without any external dependencies.
How it works
When Bazel executes a build or test action, it computes a fingerprint of the action's inputs (source files, flags, and tools). If a matching entry exists in the remote cache, Bazel downloads the output instead of running the action. Otherwise, it executes normally and uploads the result to the cache.
Shipfox exposes a WebDAV-based remote cache endpoint compatible with Bazel's --remote_cache flag. In automatic mode, the cache URL is written to ~/.bazelrc before your job starts so all Bazel invocations pick it up without any flags.
Automatic setup
When automatic caching is enabled, Shipfox writes the following line to ~/.bazelrc on every runner before your job starts:
build --remote_cache=<shipfox-cache-url>All bazel build and bazel test commands automatically use the remote cache, with no flags or configuration changes needed.
- name: Build
run: bazel build //...
- name: Test
run: bazel test //...Automatic caching is enabled by default. You can disable it per tool from your Organization Settings in the Shipfox dashboard if you prefer to manage the configuration yourself.
Manual setup
If you want to control the cache configuration yourself, use the $SHIPFOX_BAZEL_URL environment variable exposed on every runner.
Pass the cache URL directly via the --remote_cache flag:
- name: Build
run: bazel build //... --remote_cache=$SHIPFOX_BAZEL_URL
- name: Test
run: bazel test //... --remote_cache=$SHIPFOX_BAZEL_URLAlternatively, write it to your .bazelrc or a project-specific bazel.rc file for a cleaner workflow:
- name: Configure Bazel remote cache
run: echo "build --remote_cache=$SHIPFOX_BAZEL_URL" >> ~/.bazelrc
- name: Build
run: bazel build //...The Shipfox cache uses HTTP (not HTTPS) within the runner network. If Bazel rejects insecure connections, add --remote_cache_header=Authorization: or pass --noremote_require_cached as needed, or add build --remote_allow_symlink_upload to your .bazelrc. Typically no extra flags are needed.