Repository navigation
ci(docker): cache BuildKit layers in a registry the runner advertises - #31
Merged
Merged
Conversation
Resolve the layer cache on the runner: GitHub-hosted keeps the GHA cache; a self-hosted runner that sets BUILDKIT_CACHE_REGISTRY gets a registry cache (cache/<repo>:amd64, exported with ignore-error) and a buildkitd config marking that registry plain HTTP; anything else builds without a layer cache, as since the previous change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New step Resolve layer cache (
id: layer_cache) beforesetup-buildx-action:type=gha,scope=<repo>-amd64(unchanged)BUILDKIT_CACHE_REGISTRYtype=registry,ref=<registry>/cache/<repo>:amd64, exportmode=max,ignore-error=true[registry."<registry>"] http = true, insecure = trueThe hbr1 runners advertise the registry via runner env, the same way as
GRADLE_BUILD_CACHE_URL. The registry itself (build-cache-registryinarc-runners, 200 Gi local-path, weekly GC) and the runner env are rolled out separately on hbr1. Until then the workflow behaves exactly as it does today.Tests: the build steps must reference the resolver's outputs, and three new tests run the resolver script with bash (hosted / self-hosted with registry / without registry); the generated TOML parses. 7/7 green.