From 877e5b3dfe3d19d4fdd98e415a1d9b5c5efb204b Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 27 Apr 2021 17:03:43 -0700 Subject: [PATCH] Fix ansible-test AZP build lookup. --- changelogs/fragments/ansible-test-azp-build-api.yml | 2 ++ test/lib/ansible_test/_internal/ci/azp.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/ansible-test-azp-build-api.yml diff --git a/changelogs/fragments/ansible-test-azp-build-api.yml b/changelogs/fragments/ansible-test-azp-build-api.yml new file mode 100644 index 00000000000..f512d0ca94f --- /dev/null +++ b/changelogs/fragments/ansible-test-azp-build-api.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test - Use documented API to retrieve build information from Azure Pipelines. diff --git a/test/lib/ansible_test/_internal/ci/azp.py b/test/lib/ansible_test/_internal/ci/azp.py index d4a30c1d148..9d569816b47 100644 --- a/test/lib/ansible_test/_internal/ci/azp.py +++ b/test/lib/ansible_test/_internal/ci/azp.py @@ -227,9 +227,9 @@ class AzurePipelinesChanges: repositoryId='%s/%s' % (self.org, self.project), ) - url = '%s%s/build/builds?%s' % (self.org_uri, self.project, urlencode(parameters)) + url = '%s%s/_apis/build/builds?api-version=6.0&%s' % (self.org_uri, self.project, urlencode(parameters)) - http = HttpClient(self.args) + http = HttpClient(self.args, always=True) response = http.get(url) # noinspection PyBroadException