Add global docs rtd verify job 74/39374/6
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 24 May 2016 18:48:36 +0000 (14:48 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 25 May 2016 18:54:09 +0000 (14:54 -0400)
Change-Id: I3dc19ca737fb63ffbc0b072733781b69754c8a52
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/docs/docs-rtd.yaml
jjb/releng-macros.yaml

index 5db36198942b27c4ec087f9d921618ff4dc41485..c5a8dd7eadd9b1265127a7c5bc8a971a946a96ba 100644 (file)
@@ -1,7 +1,8 @@
 - project:
     name: docs-rtd
     jobs:
-        - '{name}-merge-rtd-{stream}'
+        - 'docs-merge-rtd-{stream}'
+        - 'docs-verify-rtd-{stream}'
 
     stream:
         - boron:
 
     project: 'docs'
     rtdproject: 'opendaylight'
+
+- job-template:
+    name: 'docs-merge-rtd-{stream}'
+    node: dynamic_verify
+
+    project-type: freestyle
+
+    logrotate:
+        daysToKeep: 14
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameters:
+            project: '{project}'
+            branch: '{branch}'
+            refspec: 'refs/heads/{branch}'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - change-merged-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'remerge'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '**'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                    - compare-type: ANT
+                      pattern: docs/**
+
+    builders:
+        - shell: |
+            curl -X POST https://readthedocs.org/build/{rtdproject}
+
+    publishers:
+        - email-notification:
+            email-prefix: '[docs]'
+
+- job-template:
+    name: 'docs-verify-rtd-{stream}'
+    node: dynamic_verify
+
+    project-type: freestyle
+
+    logrotate:
+        daysToKeep: 14
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameters:
+            project: '{project}'
+            branch: '{branch}'
+            refspec: 'refs/heads/{branch}'
+
+    scm:
+        - git-scm-with-submodules:
+            credentials-id: '{ssh-credentials}'
+            branch: '{branch}'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'true'
+                    exclude-trivial-rebase: 'true'
+                    exclude-no-code-change: 'true'
+                - draft-published-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'recheck'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '**'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                    - compare-type: ANT
+                      pattern: docs/**
+
+    builders:
+        - shell: |
+            cd docs/submodules/$GERRIT_PROJECT
+            git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
+        - shell: |
+            virtualenv $WORKSPACE/venv
+            source $WORKSPACE/venv/bin/activate
+            pip install --upgrade pip
+            pip freeze
+            pip install tox
+            tox -edocs
+
+    publishers:
+        - email-notification:
+            email-prefix: '[docs]'
index c2ae78f79ece66acdc4ec9e4cdc868540e1c3f70..8c8ad088467c5593c206c062ab722352fe1aa0b2 100644 (file)
             skip-tag: true
             wipe-workspace: true
 
+- scm:
+    name: git-scm-with-submodules
+    scm:
+        - git:
+            credentials-id: '{credentials-id}'
+            url: '$GIT_BASE'
+            refspec: ''
+            branches:
+                - 'refs/heads/{branch}'
+            skip-tag: true
+            wipe-workspace: true
+            submodule:
+                recursive: true
+
 - scm:
     name: gerrit-trigger-scm
     scm: