From 4734f0e4fa55e096cee35a77de1601e514abe7b2 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Thu, 5 May 2022 11:57:36 -0700 Subject: [PATCH] ci: try gcloud resultstore (#20729) Signed-off-by: Lizan Zhou --- .azure-pipelines/bazel.yml | 2 +- .bazelrc | 4 ++++ ci/build_setup.sh | 1 - ci/run_envoy_docker.sh | 1 + ci/setup_cache.sh | 5 +++++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/bazel.yml b/.azure-pipelines/bazel.yml index eef2e51dabd4..056bcab48561 100644 --- a/.azure-pipelines/bazel.yml +++ b/.azure-pipelines/bazel.yml @@ -48,11 +48,11 @@ steps: REPO_URI: $(Build.Repository.Uri) BUILD_URI: $(Build.BuildUri) ${{ if parameters.rbe }}: + GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey) ENVOY_RBE: "1" BAZEL_BUILD_EXTRA_OPTIONS: "--config=remote-ci --jobs=$(RbeJobs) ${{ parameters.bazelBuildExtraOptions }}" BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance - GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey) ${{ if eq(parameters.rbe, false) }}: BAZEL_BUILD_EXTRA_OPTIONS: "${{ parameters.bazelBuildExtraOptions }}" BAZEL_REMOTE_CACHE: $(LocalBuildCache) diff --git a/.bazelrc b/.bazelrc index 793470faaa6a..1f7c8d8c53c0 100644 --- a/.bazelrc +++ b/.bazelrc @@ -318,6 +318,10 @@ build:docker-tsan --config=rbe-toolchain-tsan build:remote-ci --remote_cache=grpcs://remotebuildexecution.googleapis.com build:remote-ci --remote_executor=grpcs://remotebuildexecution.googleapis.com +# Build Event Service +build:google-bes --bes_backend=grpcs://buildeventservice.googleapis.com +build:google-bes --bes_results_url=https://source.cloud.google.com/results/invocations/ + # Fuzz builds # Shared fuzzing configuration. diff --git a/ci/build_setup.sh b/ci/build_setup.sh index 89568eb189df..a138f378ed6f 100755 --- a/ci/build_setup.sh +++ b/ci/build_setup.sh @@ -99,7 +99,6 @@ BAZEL_BUILD_OPTIONS=( "--noshow_loading_progress" "--repository_cache=${BUILD_DIR}/repository_cache" "--experimental_repository_cache_hardlinks" - "--ui_event_filters=-info" "${BAZEL_BUILD_EXTRA_OPTIONS[@]}" "${BAZEL_EXTRA_TEST_OPTIONS[@]}") diff --git a/ci/run_envoy_docker.sh b/ci/run_envoy_docker.sh index 066bdb1cd986..ee5836a04cca 100755 --- a/ci/run_envoy_docker.sh +++ b/ci/run_envoy_docker.sh @@ -81,6 +81,7 @@ docker run --rm \ -e ENVOY_STDLIB \ -e BUILD_REASON \ -e BAZEL_REMOTE_INSTANCE \ + -e GOOGLE_BES_PROJECT_ID \ -e GCP_SERVICE_ACCOUNT_KEY \ -e NUM_CPUS \ -e ENVOY_RBE \ diff --git a/ci/setup_cache.sh b/ci/setup_cache.sh index 0733f679b784..25a2503d774f 100755 --- a/ci/setup_cache.sh +++ b/ci/setup_cache.sh @@ -17,6 +17,11 @@ if [[ -n "${GCP_SERVICE_ACCOUNT_KEY:0:1}" ]]; then bash -c 'echo "${GCP_SERVICE_ACCOUNT_KEY}"' | base64 --decode > "${GCP_SERVICE_ACCOUNT_KEY_FILE}" export BAZEL_BUILD_EXTRA_OPTIONS+=" --google_credentials=${GCP_SERVICE_ACCOUNT_KEY_FILE}" + + if [[ -n "${GOOGLE_BES_PROJECT_ID}" ]]; then + export BAZEL_BUILD_EXTRA_OPTIONS+=" --config=google-bes --bes_instance_name=${GOOGLE_BES_PROJECT_ID}" + fi + fi