Merge "Fix dcc213d ('max-git-repo-age-hours' behaviour)"
[ci-management.git] / jjb / doc / doc-templates-rtd.yaml
index 4f54322..234a767 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
@@ -67,6 +78,8 @@
           pip freeze
           cd $WORKSPACE/{path}
           tox
+          mkdir -p "$WORKSPACE/archives"
+          mv  docs/_build/html "$WORKSPACE/archives/"
 
     publishers:
       - infra-shiplogs:
@@ -84,8 +97,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: