Only use BAZELCI_AGENT_REPO and BAZELCI_AGENT_VERSION in testing branch (#1659)
To prevent us accidentally use that for production.
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py
index 75d5a35..dea80c8 100755
--- a/buildkite/bazelci.py
+++ b/buildkite/bazelci.py
@@ -1722,10 +1722,10 @@
def download_bazelci_agent(dest_dir):
repo = "bazelbuild/continuous-integration"
- if "BAZELCI_AGENT_REPO" in os.environ:
+ if THIS_IS_TESTING and "BAZELCI_AGENT_REPO" in os.environ:
repo = os.environ["BAZELCI_AGENT_REPO"]
version = "0.1.4"
- if "BAZELCI_AGENT_VERSION" in os.environ:
+ if THIS_IS_TESTING and "BAZELCI_AGENT_VERSION" in os.environ:
version = os.environ["BAZELCI_AGENT_VERSION"]
postfix = ""
if is_windows():