summaryrefslogtreecommitdiffhomepage
path: root/scripts/common_build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/common_build.sh')
-rwxr-xr-xscripts/common_build.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/common_build.sh b/scripts/common_build.sh
index 4fe1067d2..d4a6c4908 100755
--- a/scripts/common_build.sh
+++ b/scripts/common_build.sh
@@ -31,9 +31,9 @@ declare -a BAZEL_FLAGS=(
"--keep_going"
"--verbose_failures=true"
)
-if [[ -v KOKORO_BAZEL_AUTH_CREDENTIAL ]]; then
+# If running via kokoro, use the remote config.
+if [[ -v KOKORO_ARTIFACTS_DIR ]]; then
BAZEL_FLAGS+=(
- "--auth_credentials=${KOKORO_BAZEL_AUTH_CREDENTIAL}"
"--config=remote"
)
fi
@@ -63,6 +63,10 @@ function run_as_root() {
bazel run --run_under="sudo" "${binary}" -- "$@"
}
+function query() {
+ bazel query "$@"
+}
+
function collect_logs() {
# Zip out everything into a convenient form.
if [[ -v KOKORO_ARTIFACTS_DIR ]] && [[ -e bazel-testlogs ]]; then