Switch to RTD Generic Webhook API 71/75571/3
authorRich Bennett <rb2745@att.com>
Wed, 9 Jan 2019 16:31:16 +0000 (11:31 -0500)
committerRich Bennett <rb2745@att.com>
Fri, 11 Jan 2019 00:57:35 +0000 (19:57 -0500)
API in use has been deprecated
Switch to the Generic API ...api/v2/webhook/...
Use credentials-binding wrapper for RTD token

Change-Id: I39252db79f8f3cd9f948bc66e8a543203a8a5b76
Issue-ID: CIMAN-230
Signed-off-by: Rich Bennett <rb2745@att.com>
jjb/doc/doc-post-rtd.sh
jjb/doc/doc-templates-rtd.yaml
jjb/doc/doc.yaml

index 5c8d8c5..78b8d0b 100644 (file)
@@ -6,4 +6,7 @@ else
 fi
 
 # shellcheck disable=SC1083
-curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/{rtdproject}
+curl -X POST \
+    -d "branches=$RTD_BUILD_VERSION" \
+    -d "token=$DOCS_RTD_TOKEN"  \
+    https://readthedocs.org/api/v2/webhook/{rtdproject}
index 77cea69..234a767 100644 (file)
     wrappers:
       - infra-wrappers:
           build-timeout: '{build-timeout}'
+      - credentials-binding:
+          - text:
+             credential-id: docs-token
+             variable: DOCS_RTD_TOKEN
 
     triggers:
       - gerrit:
index 6986dff..8515d73 100644 (file)
@@ -14,7 +14,7 @@
       - '{project-name}-{stream}-merge-rtd'
 
     project: 'doc'
-    rtdproject: 'onap'
+    rtdproject: 'onap/58810/'
     mvn-settings: 'doc-settings'
     stream:
       - master: