From 09bffde2402b60e14ad88efbf884919c276a0c80 Mon Sep 17 00:00:00 2001 From: Florian Weikert Date: Tue, 13 Jul 2021 16:35:31 +0200 Subject: [PATCH] Set BAZELISK_USER_AGENT env variable. CI should have its own user agent value in order to distinguish itself from "regular" Bazelisk users in the download statistics. This commit won't have any effect before we deploy Bazelisk v1.10.0 or later to all CI workers. --- buildkite/bazelci.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py index 225460aad9..9556e14252 100755 --- a/buildkite/bazelci.py +++ b/buildkite/bazelci.py @@ -1033,6 +1033,11 @@ def execute_commands( # If the CI worker runs Bazelisk, we need to forward all required env variables to the test. # Otherwise any integration test that invokes Bazel (=Bazelisk in this case) will fail. test_env_vars = ["LocalAppData"] if platform == "windows" else ["HOME"] + + # CI should have its own user agent so that we can remove it from Bazel download statistics. + os.environ["BAZELISK_USER_AGENT"] = "Bazelisk/BazelCI" + test_env_vars.append("BAZELISK_USER_AGENT") + if git_repo_location: os.chdir(git_repo_location) elif git_repository: