[doctor] add missing param (GIT_BASE)
[releng.git] / jjb / doctor / doctor.yml
index b0387de..2c11752 100644 (file)
 - project:
     name: doctor
-    jobs:
-        - 'doctor-test'
-        - 'doctor-daily-master'
 
-    # stream:    branch with - in place of / (eg. stable-helium)
-    # branch:    branch (eg. stable/helium)
+    project: '{name}'
+
     stream:
         - master:
-            branch: 'master'
+            branch: '{stream}'
+            gs-pathname: ''
+            docker_tag: 'master'
+            disabled: false
+        - colorado:
+            branch: 'stable/{stream}'
+            gs-pathname: '/{stream}'
+            docker_tag: 'stable'
+            disabled: false
+
+    installer:
+        - apex:
+            slave-label: 'ool-virtual1'
+            pod: 'ool-virtual1'
+
+    inspector:
+        - sample
+        - congress
 
-    project: 'doctor'
-    somevar: 'foo'
+    jobs:
+        - 'doctor-verify-{stream}'
+        - 'doctor-verify-{installer}-{inspector}-{stream}'
 
 - job-template:
-    name: doctor-test
-
-    project-type: freestyle
+    name: 'doctor-verify-{stream}'
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
+    disabled: '{obj:disabled}'
 
-    builders:
-        - shell: |
-            echo "Hello world from doctor"
-
-- job-template:
-    name: 'doctor-daily-master'
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - 'opnfv-build-ubuntu-defaults'
 
-    # Job template for daily builders
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
 
-    project-type: freestyle
-    varsetabove: '{somevar}'
+    triggers:
+        - gerrit:
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'false'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'false'
+                - draft-published-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'recheck'
+                - comment-added-contains-event:
+                    comment-contains-value: 'reverify'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: ANT
+                    pattern: 'tests/**'
 
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-artifact-num-to-keep}'
+    builders:
+        - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
 
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
+- job-template:
+    name: 'doctor-verify-{installer}-{inspector}-{stream}'
+
+    node: '{slave-label}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - string:
+            name: INSPECTOR_TYPE
+            default: '{inspector}'
+            description: 'Doctor inspector type to be used'
+        - string:
+            name: OS_CREDS
+            default: /home/jenkins/openstack.creds
+            description: 'OpenStack credentials'
+        - '{slave-label}-defaults'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
 
     triggers:
-        - timed: 'H H * * *'
-
-    prebuilders:
-        - test-macro
+        - gerrit:
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'false'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'false'
+                - draft-published-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'recheck'
+                - comment-added-contains-event:
+                    comment-contains-value: 'reverify'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: ANT
+                    pattern: 'tests/**'
+            skip-vote:
+                successful: true
+                failed: true
+                unstable: true
+                notbuilt: true
 
     builders:
-        - shell: |
-            echo "Hello world from doctor {somevar} daily"
-        - test-macro
-
-    postbuilders:
-        - test-macro
-
+        - trigger-builds:
+          - project: 'functest-{installer}-{pod}-suite-{stream}'
+            current-parameters: true
+            predefined-parameters: |
+              FUNCTEST_SUITE_NAME=doctor
+              TESTCASE_OPTIONS='-e INSPECTOR_TYPE=$INSPECTOR_TYPE -v $WORKSPACE:$HOME/opnfv/repos/doctor'
+            block: true
+            same-node: true