Allow rechecking a patchset about docs
[ci-management.git] / jjb / doc / doc-templates-rtd.yaml
index 4f54322..d4e5424 100644 (file)
@@ -9,8 +9,6 @@
     # Optional Variables:
     #     path:      directory containing the project's tox.ini relative to
     #                the workspace. The default is the project root.
-    #     pattern:   ant file-path pattern relative to the workspace used to
-    #                trigger the job
 
     name: '{project-name}-{stream}-verify-rtd'
     path: '$WORKSPACE'
           maven-version: '{maven-version}'
 
     scm:
-      - gerrit-trigger-scm:
-          refspec: '$GERRIT_REFSPEC'
-          choosing-strategy: 'gerrit'
-          submodule-recursive: '{submodule-recursive}'
+      - git:
+          credentials-id: '{jenkins-ssh-credential}'
+          url: '$GIT_BASE'
+          refspec: ''
+          choosing-strategy: 'default'
+          branches:
+            - 'refs/heads/{branch}'
+          skip-tag: true
+          wipe-workspace: true
+          submodule:
+            recursive: '{submodule-recursive}'
+            timeout: '24'
 
     wrappers:
       - infra-wrappers:
     builders:
       - shell: |
           if [ "$GERRIT_PROJECT" != "doc" ]; then
-              cd docs/submodules/$GERRIT_PROJECT
+              if [ -d docs/submodules/$GERRIT_PROJECT.git ]; then
+                  cd docs/submodules/$GERRIT_PROJECT.git
+              else
+                  cd docs/submodules/$GERRIT_PROJECT
+              fi
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
           else
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
           fi
+      - shell: !include-raw: doc-install-plantuml.sh
       - shell: |
           #!/bin/bash
-          virtualenv $WORKSPACE/venv-tox
+          python3 -m venv $WORKSPACE/venv-tox
           source $WORKSPACE/venv-tox/bin/activate
           pip install --upgrade pip
           pip install --upgrade tox argparse
           pip freeze
           cd $WORKSPACE/{path}
           tox
+          mkdir -p "$WORKSPACE/archives"
+          mv  docs/_build/html "$WORKSPACE/archives/"
 
     publishers:
-      - infra-shiplogs:
-          maven-version: '{maven-version}'
+      - lf-infra-publish
 
 - job-template:
     # Job template for merging/publishing Sphinx/Restructured Text at RTD
@@ -84,8 +96,6 @@
     # Optional Variables:
     #     path:      directory containing the project's tox.ini relative to
     #                the workspace. The default is the project root.
-    #     pattern:   ant file-path pattern relative to the workspace used to
-    #                trigger the job
 
     name: '{project-name}-{stream}-merge-rtd'
     path: '$WORKSPACE'
           maven-version: '{maven-version}'
 
     scm:
-      - gerrit-trigger-scm:
-          refspec: '$GERRIT_REFSPEC'
-          choosing-strategy: 'gerrit'
+      - git:
+          credentials-id: '{jenkins-ssh-credential}'
+          url: '$GIT_BASE'
+          refspec: ''
+          choosing-strategy: 'default'
+          branches:
+            - 'refs/heads/{branch}'
+          skip-tag: true
+          wipe-workspace: true
           submodule-recursive: '{submodule-recursive}'
 
+
     wrappers:
       - infra-wrappers:
           build-timeout: '{build-timeout}'
+      - credentials-binding:
+          - text:
+             credential-id: docs-token
+             variable: DOCS_RTD_TOKEN
 
     triggers:
       - gerrit:
       - shell: !include-raw: doc-post-rtd.sh
 
     publishers:
-      - infra-shiplogs:
-          maven-version: '{maven-version}'
-
+      - lf-infra-publish