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 f2a9d206cc7..b8d78ed2aab 100644 --- a/test/lib/ansible_test/_internal/ci/azp.py +++ b/test/lib/ansible_test/_internal/ci/azp.py @@ -230,9 +230,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