mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
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:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user