From 84f555bfd8aefb1b0e12d14b56949bbfbef78d5f Mon Sep 17 00:00:00 2001
From: Jan Tattermusch <jtattermusch@google.com>
Date: Mon, 16 Sep 2019 16:31:21 +0200
Subject: [PATCH] simplify and unify manual builds

---
 tools/remote_build/README.md       | 2 +-
 tools/remote_build/manual.bazelrc  | 7 +++----
 tools/remote_build/windows.bazelrc | 2 ++
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/tools/remote_build/README.md b/tools/remote_build/README.md
index aa96704f4c..68d6840057 100644
--- a/tools/remote_build/README.md
+++ b/tools/remote_build/README.md
@@ -32,7 +32,7 @@ bazel --bazelrc=tools/remote_build/manual.bazelrc test --config=asan //test/...
 Run on Windows MSVC:
 ```
 # RBE manual run only for c-core (must be run on a Windows host machine)
-bazel --bazelrc=tools/remote_build/windows.bazelrc build :all [--google_credentials=(path to service account credentials)]
+bazel --bazelrc=tools/remote_build/windows.bazelrc build :all
 ```
 
 Available command line options can be found in
diff --git a/tools/remote_build/manual.bazelrc b/tools/remote_build/manual.bazelrc
index c3c6af4287..9819a9ffb3 100644
--- a/tools/remote_build/manual.bazelrc
+++ b/tools/remote_build/manual.bazelrc
@@ -20,11 +20,10 @@ import %workspace%/tools/remote_build/rbe_common.bazelrc
 build --remote_cache=grpcs://remotebuildexecution.googleapis.com
 build --remote_executor=grpcs://remotebuildexecution.googleapis.com
 
-# Enable authentication. This will pick up application default credentials by
-# default. You can use --auth_credentials=some_file.json to use a service
-# account credential instead.
+# Enable authentication. Bazel will use application default credentials
+# unless overridden by --google_credentials=service_account_credentials.json
 # How to setup credentials:
-# See https://cloud.google.com/remote-build-execution/docs/getting-started#set_credentials
+# https://cloud.google.com/remote-build-execution/docs/results-ui/getting-started-results-ui
 build --auth_enabled=true
 
 # Set flags for uploading to BES in order to view results in the Bazel Build
diff --git a/tools/remote_build/windows.bazelrc b/tools/remote_build/windows.bazelrc
index 825d6765de..e9b418f983 100644
--- a/tools/remote_build/windows.bazelrc
+++ b/tools/remote_build/windows.bazelrc
@@ -3,6 +3,8 @@ startup --host_jvm_args=-Dbazel.DigestFunction=SHA256
 build --remote_cache=grpcs://remotebuildexecution.googleapis.com
 build --remote_executor=grpcs://remotebuildexecution.googleapis.com
 
+build --auth_enabled=true
+
 build --host_crosstool_top=//third_party/toolchains/bazel_0.26.0_rbe_windows:toolchain
 build --crosstool_top=//third_party/toolchains/bazel_0.26.0_rbe_windows:toolchain
 build --extra_toolchains=//third_party/toolchains/bazel_0.26.0_rbe_windows:cc-toolchain-x64_windows
-- 
GitLab