Add BAZELISK_BASE_URLS to allow layering bazel caches#780
Draft
aiuto wants to merge 5 commits intobazelbuild:masterfrom
Draft
Add BAZELISK_BASE_URLS to allow layering bazel caches#780aiuto wants to merge 5 commits intobazelbuild:masterfrom
aiuto wants to merge 5 commits intobazelbuild:masterfrom
Conversation
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.
Adds the .rc file variable BAZELISK_BASE_URLS.
This is a comma separated URLs, each of which has the behavior of BAZELISK_BASE_URL.
Bazelisk will iterate through the base URLs in that list, trying to pull a copy of bazel from each. Once it finds one, it stops. If you specify BAZELISK_BASE_URLS, it has precedence over BAZELISK_BASE_URL.
The expected use case is:
BAZELISK_BASE_URLS=file:///cache/local/bazels;https://github.com/bazelbuild/bazel/releases/downloadIf you are in a muli-platform organization, you may want to tune each local cache to only include bazel versions that match the platform of the build machine. When the .bazelversion specified in the repo of a CI job is found in that local cache, bazelisk will not have to go off machine to find the right bazel. If the specified Bazel version is not found, bazelisk will fall back to the next URL in the list. This offers graceful degradation as various projects move to different bazel versions, without having to update a fleet of build machines in advance.
#779