Apex: add job to verify only unit test changes 27/19527/3
authorTim Rozet <trozet@redhat.com>
Wed, 24 Aug 2016 17:02:15 +0000 (13:02 -0400)
committerTim Rozet <trozet@redhat.com>
Wed, 24 Aug 2016 17:05:25 +0000 (13:05 -0400)
Change-Id: I76d79ae45e134646f1331a733e4c03948ee9f93a
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex.yml

index 8ae90f7..8a5a82f 100644 (file)
@@ -2,6 +2,7 @@
     name: apex
     jobs:
         - 'apex-verify-{stream}'
+        - 'apex-verify-unit-tests-{stream}'
         - 'apex-runner-{platform}-{scenario}-{stream}'
         - 'apex-runner-cperf-{stream}'
         - 'apex-build-{stream}'
          - 'baremetal'
          - 'virtual'
 
+# Unit Test
+- job-template:
+    name: 'apex-verify-unit-tests-{stream}'
+
+    node: '{verify-slave}'
+
+    concurrent: true
+
+    parameters:
+        - apex-parameter:
+            gs-pathname: '{gs-pathname}'
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: "Used for overriding the GIT URL coming from parameters macro."
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'false'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'true'
+                - 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: 'apex'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: ANT
+                    pattern: 'tests/**'
+    properties:
+        - throttle:
+            max-per-node: 1
+            max-total: 10
+            option: 'project'
+
+    builders:
+        - 'apex-unit-test'
+
 # Verify
 - job-template:
     name: 'apex-verify-{stream}'