tf-a-tftf-docs-watcher.yaml: migrate to RTD v3 API
The ReadTheDocs v2 API has been deprecated.
This update migrates the configuration to
use the v3 API.
Change-Id: Ie7f79ae90587d51bb94a874cab3d6e8703153863
Signed-off-by: Arthur She <arthur.she@linaro.org>
diff --git a/tf-a-tftf-docs-watcher.yaml b/tf-a-tftf-docs-watcher.yaml
index 28b8965..34cbc74 100644
--- a/tf-a-tftf-docs-watcher.yaml
+++ b/tf-a-tftf-docs-watcher.yaml
@@ -8,8 +8,11 @@
builders:
- shell: |-
#!/bin/bash -e
- echo "Notifying ReadTheDocs of changes on: $RTD_BRANCHES"
- curl -X POST -d "branches=$RTD_BRANCHES" -d "token=$RTD_TOKEN" https://readthedocs.org/api/v2/webhook/trustedfirmware-a-tests/104345/
+ echo "Trigger ReadTheDocs build on the $RTD_BRANCHES branch and the latest version"
+ RTD_API="https://readthedocs.org/api/v3/projects/trustedfirmware-a-tests"
+ curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/$RTD_BRANCHES/builds/ | jq .
+ echo "Trigger build latest version"
+ curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/latest/builds/ | jq .
properties:
- build-discarder:
days-to-keep: 7