Squashed commit
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py index 9ebe356..4952260 100755 --- a/buildkite/bazelci.py +++ b/buildkite/bazelci.py
@@ -53,6 +53,7 @@ THIS_IS_TRUSTED = BUILDKITE_ORG == "bazel-trusted" THIS_IS_SPARTA = True +ORGS = frozenset(["bazel", "bazel-trusted", "bazel-testing"]) CLOUD_PROJECT = "bazel-public" if THIS_IS_TRUSTED else "bazel-untrusted" GITHUB_BRANCH = {"bazel": "master", "bazel-trusted": "master", "bazel-testing": "testing"}[ @@ -648,7 +649,7 @@ _NEXT_PAGE_PATTERN = re.compile(r'<(?P<url>\S+)>; rel="next"', re.MULTILINE) def __init__(self, org, pipeline=None): - if org not in GITHUB_BRANCH: + if org not in ORGS: raise BuildkiteException(f"Unknown organization: {org}") self._org = org @@ -664,9 +665,9 @@ "versions", "access", "latest", - f'--secret="{secret_id}"', - f'--project="{CLOUD_PROJECT}"', - ] + f"--secret={secret_id}", + ], + print_output=False, ) def _get_url_response(self, full_url, retries=5): @@ -1513,7 +1514,7 @@ upload_log_file(json_profile_out_build, tmpdir) if capture_corrupted_outputs_dir_build: upload_corrupted_outputs(capture_corrupted_outputs_dir_build, tmpdir) - + if is_trueish(os.environ.get("ENABLE_METRICS_COLLECTION", "false")): if not test_targets or not build_succeeded: try: