fix(ci): avoid remote-only Bazel config without key

Use the shared v8-ci Bazel rc only when BUILDBUDDY_API_KEY is available, and keep the no-key fallback on the build command so Bazel does not treat command options as startup flags.
This commit is contained in:
James Peter
2026-03-23 19:14:02 +10:00
parent e3b372b359
commit 7fd302e2c3
2 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -114,16 +114,16 @@ jobs:
--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)
)
bazel_flags=(
bazel_startup_flags=(
--noexperimental_remote_repo_contents_cache
--bazelrc=.github/workflows/v8-ci.bazelrc
)
bazel_extra_args=()
if [[ -n "${BUILDBUDDY_API_KEY}" ]]; then
bazel_flags+=("--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}")
bazel_startup_flags+=(--bazelrc=.github/workflows/v8-ci.bazelrc)
bazel_extra_args+=("--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}")
else
bazel_flags+=(
--strategy=local
bazel_extra_args+=(
--remote_executor=
--remote_cache=
--bes_backend=
@@ -131,7 +131,7 @@ jobs:
)
fi
bazel "${bazel_flags[@]}" "${bazel_args[@]}"
bazel "${bazel_startup_flags[@]}" "${bazel_args[@]}" "${bazel_extra_args[@]}"
- name: Stage release pair
env:
+6 -6
View File
@@ -106,16 +106,16 @@ jobs:
--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)
)
bazel_flags=(
bazel_startup_flags=(
--noexperimental_remote_repo_contents_cache
--bazelrc=.github/workflows/v8-ci.bazelrc
)
bazel_extra_args=()
if [[ -n "${BUILDBUDDY_API_KEY}" ]]; then
bazel_flags+=("--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}")
bazel_startup_flags+=(--bazelrc=.github/workflows/v8-ci.bazelrc)
bazel_extra_args+=("--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}")
else
bazel_flags+=(
--strategy=local
bazel_extra_args+=(
--remote_executor=
--remote_cache=
--bes_backend=
@@ -123,7 +123,7 @@ jobs:
)
fi
bazel "${bazel_flags[@]}" "${bazel_args[@]}"
bazel "${bazel_startup_flags[@]}" "${bazel_args[@]}" "${bazel_extra_args[@]}"
- name: Stage release pair
env: