1#@IgnoreInspection BashAddShebang
2# Copyright 2022 The gRPC Authors
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# bazelrc to configure bazel to use gRPC's main RBE instance for remote cache
17# and to upload build results to build event service (for bazel build UI results).
18# Note that remote build and test execution is left unconfigured.
19
20startup --host_jvm_args=-Dbazel.DigestFunction=SHA256
21
22# the RBE instance to use
23build --remote_instance_name=projects/grpc-testing/instances/default_instance
24
25# Enable authentication (to be able access the RBE service)
26# Bazel will use application default credentials
27# unless overridden by --google_credentials=service_account_credentials.json
28# How to setup credentials to be able to use bazel RBE locally:
29# https://cloud.google.com/remote-build-execution/docs/results-ui/getting-started-results-ui
30# TODO(jtattermusch): Option 'auth_enabled' is deprecated: Use --google_default_credentials instead
31build --auth_enabled=true
32
33# use remote cache (remote execution needs to be configured separately)
34# Note that remote cache is needed
35# not only for build speedup, but also for the test logs
36# to become available in ResultStore.
37build --remote_cache=grpcs://remotebuildexecution.googleapis.com
38
39# Set flags for uploading to BES in order to view results in the Bazel Build
40# Results UI.
41build --bes_backend=grpcs://buildeventservice.googleapis.com
42build --bes_timeout=600s
43build --bes_results_url="https://source.cloud.google.com/results/invocations/"
44# TODO(jtattermusch): Option 'project_id' is deprecated: Use --bes_instance_name instead
45build --project_id=grpc-testing
46