fix(ci): fall back when BuildBuddy key is absent

Make the V8 Bazel workflows use the shared remote BuildBuddy path only when BUILDBUDDY_API_KEY is available, and clear remote/BES settings so the jobs can run locally when the secret is missing.
This commit is contained in:
James Peter
2026-03-23 18:25:16 +10:00
parent 87c53936a9
commit c6eddcc34f
2 changed files with 36 additions and 10 deletions
+18 -5
View File
@@ -114,11 +114,24 @@ jobs:
--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)
)
bazel \
--noexperimental_remote_repo_contents_cache \
--bazelrc=.github/workflows/v8-ci.bazelrc \
"${bazel_args[@]}" \
"--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}"
bazel_flags=(
--noexperimental_remote_repo_contents_cache
--bazelrc=.github/workflows/v8-ci.bazelrc
)
if [[ -n "${BUILDBUDDY_API_KEY}" ]]; then
bazel_flags+=("--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}")
else
bazel_flags+=(
--strategy=local
--remote_executor=
--remote_cache=
--bes_backend=
--bes_results_url=
)
fi
bazel "${bazel_flags[@]}" "${bazel_args[@]}"
- name: Stage release pair
env:
+18 -5
View File
@@ -106,11 +106,24 @@ jobs:
--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)
)
bazel \
--noexperimental_remote_repo_contents_cache \
--bazelrc=.github/workflows/v8-ci.bazelrc \
"${bazel_args[@]}" \
"--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}"
bazel_flags=(
--noexperimental_remote_repo_contents_cache
--bazelrc=.github/workflows/v8-ci.bazelrc
)
if [[ -n "${BUILDBUDDY_API_KEY}" ]]; then
bazel_flags+=("--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}")
else
bazel_flags+=(
--strategy=local
--remote_executor=
--remote_cache=
--bes_backend=
--bes_results_url=
)
fi
bazel "${bazel_flags[@]}" "${bazel_args[@]}"
- name: Stage release pair
env: