summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2021-04-27 17:03:43 -0700
committerMatt Clay <matt@mystile.com>2021-04-28 10:49:38 -0700
commitd51ec33d8462353932145941e6d9330637ee630b (patch)
tree80f099071608c4df49c1b6637572b61918f39f19
parent75d9fa648eef64a10b7c0eeccb3d4fffa97aaae9 (diff)
downloadansible-d51ec33d8462353932145941e6d9330637ee630b.tar.gz
[stable-2.11] Fix ansible-test AZP build lookup.
(cherry picked from commit 877e5b3dfe3d19d4fdd98e415a1d9b5c5efb204b) Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r--changelogs/fragments/ansible-test-azp-build-api.yml2
-rw-r--r--test/lib/ansible_test/_internal/ci/azp.py4
2 files changed, 4 insertions, 2 deletions
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 0000000000..f512d0ca94
--- /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 807c115bf1..e981e83291 100644
--- a/test/lib/ansible_test/_internal/ci/azp.py
+++ b/test/lib/ansible_test/_internal/ci/azp.py
@@ -228,9 +228,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