Skip to content

Commit

Permalink
Set BAZELISK_USER_AGENT env variable.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fweikert committed Jul 13, 2021
1 parent 6c6cb37 commit 09bffde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions buildkite/bazelci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 09bffde

Please sign in to comment.