Fix rtd-build url and slug
[releng.git] / jjb / opnfvdocs / docs-rtd.yaml
index a239b4e..8906dfd 100644 (file)
@@ -1,23 +1,25 @@
 ---
 - project:
     name: docs-rtd
+    project: 'opnfvdocs'
+    project-name: 'opnfvdocs'
+    rtd-build-url: 'https://readthedocs.org/api/v2/webhook/opnfvdocsdemo/79560/'
+    rtd-token: 'a96c3622a270344cf9bf3f73b0dfa04f59fc59c0'
+    project-pattern: 'opnfvdocs'
     jobs:
+      - '{project-name}-rtd-jobs'
       - 'docs-merge-rtd-{stream}'
       - 'docs-verify-rtd-{stream}'
 
     stream:
       - master:
           branch: 'master'
+      - gambia:
+          branch: 'stable/{stream}'
       - fraser:
           branch: 'stable/{stream}'
       - danube:
           branch: 'stable/{stream}'
-      - euphrates:
-          branch: 'stable/{stream}'
-
-    project: 'opnfvdocs'
-    rtdproject: 'opnfv'
-    # TODO: Archive Artifacts
 
 - job-template:
     name: 'docs-merge-rtd-{stream}'
 
     builders:
       - 'remove-old-docs-from-opnfv-artifacts'
-      - shell: |
-          if [ $GERRIT_BRANCH == "master" ]; then
-            RTD_BUILD_VERSION=latest
-          else
-            RTD_BUILD_VERSION=${{GERRIT_BRANCH/\//-}}
-          fi
-          curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/opnfvdocsdemo
-
 
 - job-template:
     name: 'docs-verify-rtd-{stream}'
     triggers:
       - gerrit-trigger-patchset-created:
           server: 'gerrit.opnfv.org'
-          project: '**'
+          project: 'opnfvdocs'
           branch: '{branch}'
           files: 'docs/**'
 
     builders:
-      - shell: |
-          if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
-              # Temporary hacky solution to handle local builds for projects
-              # that already moved away from submodules
-              if ! cd docs/submodules/$GERRIT_PROJECT 2 > /dev/null; then
-                  rm -rf .* * 2 > /dev/null
-                  git clone ${{GIT_BASE/opnfvdocs/$GERRIT_PROJECT}} .
-              fi
-              git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
-              cd -
-          else
-              git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
-          fi
-          if [ -d docs/subdmodules ]; then
-              for project in docs/submodules/*; do
-                  cd $project && git submodule deinit -f . && cd -
-              done
-          fi
       - shell: |
           sudo -H pip install virtualenv
           virtualenv $WORKSPACE/venv