SERVER-85667 Disable Bazel Remote Execution on Public Releases (#18346) (#18358)

GitOrigin-RevId: 46defc225c999e47bc7791d11d443bd7ee86db5e
This commit is contained in:
Zack Winter 2024-01-24 16:49:47 -08:00 committed by MongoDB Bot
parent d325c40bf1
commit 749798bdb6
2 changed files with 18 additions and 0 deletions

View File

@ -52,6 +52,18 @@ build:local --experimental_remote_cache_compression=false
build:local --grpc_keepalive_time=0s
build:local --legacy_important_outputs
# Disable remote execution and caching for public releases
--config=public-release
build:public-release --remote_executor=
build:public-release --remote_cache=
build:public-release --bes_backend=
build:public-release --bes_results_url=
build:public-release --tls_client_certificate=
build:public-release --tls_client_key=
build:public-release --experimental_remote_cache_compression=false
build:public-release --grpc_keepalive_time=0s
build:public-release --legacy_important_outputs
# try to import the bazelrc files if available
try-import %workspace%/.bazelrc.local

View File

@ -482,6 +482,12 @@ def generate(env: SCons.Environment.Environment) -> None:
if normalized_os != "linux" or normalized_arch not in ["arm64", 'amd64']:
bazel_internal_flags.append('--config=local')
# Disable remote execution for public release builds.
if env.GetOption("release") is not None and (
env.GetOption("cache-dir") is None
or env.GetOption("cache-dir") == "$BUILD_ROOT/scons/cache"):
bazel_internal_flags.append('--config=public-release')
Globals.bazel_base_build_command = [
os.path.abspath("bazelisk"),
'build',