[ci] Fix automatic buildkite token fetching in fetch_release_logs.py (#24606)

The script expected a return string, not an environment variable.
This commit is contained in:
Kai Fricke 2022-05-10 09:24:10 +02:00 committed by GitHub
parent b5b48f6cc7
commit 67d602e7a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,7 +95,7 @@ def maybe_fetch_buildkite_token() -> str:
return buildkite_token
print("Missing BUILDKITE_TOKEN, retrieving from AWS secrets store")
os.environ["BUILDKITE_TOKEN"] = boto3.client(
buildkite_token = boto3.client(
"secretsmanager", region_name="us-west-2"
).get_secret_value(
SecretId="arn:aws:secretsmanager:us-west-2:029272617770:secret:"
@ -103,6 +103,8 @@ def maybe_fetch_buildkite_token() -> str:
)[
"SecretString"
]
os.environ["BUILDKITE_TOKEN"] = buildkite_token
return buildkite_token
def get_results_from_build_collection(