Skip to content

Commit

Permalink
Always pass USE_BAZEL_VERSION as --test_env when it exists (#846)
Browse files Browse the repository at this point in the history
* Always pass USE_BAZEL_VERSION as --test_env when it exists

* Make sure USE_BAZEL_VERSION points to the actual Bazel binary we want to use

Change-Id: I67928007a1117ebbfa096eceb96d7b4b8508fc07
  • Loading branch information
meteorcloudy authored Oct 14, 2019
1 parent 3643743 commit f0a66e2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions buildkite/bazelci.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,16 +795,19 @@ def execute_commands(
bazel_binary = download_bazel_binary_at_commit(
tmpdir, binary_platform, use_bazel_at_commit
)
os.environ["USE_BAZEL_VERSION"] = bazel_binary
elif use_but:
print_collapsed_group(":gcloud: Downloading Bazel Under Test")
bazel_binary = download_bazel_binary(tmpdir, binary_platform)
os.environ["USE_BAZEL_VERSION"] = bazel_binary
else:
bazel_binary = "bazel"
if bazel_version:
# This will only work if the bazel binary in $PATH is actually a bazelisk binary
# (https://github.com/bazelbuild/bazelisk).
os.environ["USE_BAZEL_VERSION"] = bazel_version
test_env_vars.append("USE_BAZEL_VERSION")
if "USE_BAZEL_VERSION" in os.environ:
# This will only work if the bazel binary in $PATH is actually a bazelisk binary
# (https://github.com/bazelbuild/bazelisk).
test_env_vars.append("USE_BAZEL_VERSION")

for key, value in task_config.get("environment", {}).items():
# We have to explicitly convert the value to a string, because sometimes YAML tries to
Expand Down

0 comments on commit f0a66e2

Please sign in to comment.