Add parameters and change trigger to change-merged 47/28447/2
authorrohitsakala <rohitsakala@gmail.com>
Fri, 10 Feb 2017 16:03:30 +0000 (21:33 +0530)
committerRohit Sakala <rohitsakala@gmail.com>
Fri, 10 Feb 2017 16:08:07 +0000 (16:08 +0000)
Trigger is changed to change-merged for testing and will be reverted to
weekly once there is a successful build

Change-Id: I99a7f49e3d05e4915f1a2dd225fcf4ffde312df3
Signed-off-by: rohitsakala <rohitsakala@gmail.com>
jjb/releng/testapi-automate.yml

index 0b6c36e..73b600d 100644 (file)
         - 'testapi-automate-{stream}'
         - 'testapi-automate-{phase}-{stream}'
         - 'testapi-verify-{stream}'
+        - 'testapi-mongodb-backup'
 
     project: 'releng'
 
 - job:
     name: 'testapi-mongodb-backup'
 
-    slave-label: 'testresults'
-
     parameters:
+        - label:
+            name: SLAVE_LABEL
+            default: 'testresults'
+            description: 'Slave label on Jenkins'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: 'Git URL to use on this Jenkins Slave'
         - project-parameter:
             project: '{project}'
             branch: '{branch}'
     scm:
         - git-scm
 
+    #triggers:
+    #    - timed: '@weekly'
     triggers:
-        - timed: '@weekly'
+        - gerrit:
+            server-name: 'gerrit.opnfv.org'
+            trigger-on:
+                - change-merged-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'remerge'
+            projects:
+                - project-compare-type: 'ANT'
+                  project-pattern: '{project}'
+                  branches:
+                    - branch-compare-type: 'ANT'
+                      branch-pattern: '**/{branch}'
+                  file-paths:
+                    - compare-type: 'ANT'
+                      pattern: 'utils/test/testapi/**'
 
     builders:
         - mongodb-backup