Merge "update builder script and how-to-use-docs"
[releng.git] / jjb / vswitchperf / vswitchperf.yml
index 4064d27..a7b78d1 100644 (file)
@@ -1,8 +1,9 @@
 - project:
     name: vswitchperf
     jobs:
-        - 'vswitchperf-test'
-        - 'vswitchperf-daily-master'
+        - 'vswitchperf-daily-{stream}'
+        - 'vswitchperf-merge-{stream}'
+        - 'vswitchperf-verify-{stream}'
 
     # stream:    branch with - in place of / (eg. stable-helium)
     # branch:    branch (eg. stable/helium)
     somevar: 'foo'
 
 - job-template:
-    name: vswitchperf-test
-
-    project-type: freestyle
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
-
-    builders:
-        - shell: |
-            echo "Hello world from vswitchperf"
-
-- job-template:
-    name: 'vswitchperf-daily-master'
+    name: 'vswitchperf-daily-{stream}'
 
     # Job template for daily builders
     #
@@ -37,8 +23,8 @@
     #     stream:    branch with - in place of / (eg. stable)
     #     branch:    branch (eg. stable)
 
-    project-type: freestyle
     varsetabove: '{somevar}'
+    node: opnfv-build
 
     logrotate:
         daysToKeep: '{build-days-to-keep}'
         artifactDaysToKeep: '{build-artifact-days-to-keep}'
         artifactNumToKeep: '{build-artifact-num-to-keep}'
 
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/vswitchperf
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
 
     triggers:
         - timed: 'H H * * *'
 
     builders:
         - shell: |
-            echo "Hello world from vswitchperf {somevar} daily"
-        - test-macro
+            pwd
+            cd src
+            make clobber
+            make
+            # run basic sanity test
+            make sanity
 
     postbuilders:
         - test-macro
 
+- job-template:
+    name: 'vswitchperf-verify-{stream}'
+
+    project-type: freestyle
+
+    node: opnfv-build
+
+    concurrent: true
+
+    properties:
+        - throttle:
+            enabled: true
+            max-total: 3
+            max-per-node: 2
+
+    logrotate:
+        daysToKeep: 30
+        numToKeep: 10
+        artifactDaysToKeep: -1
+        artifactNumToKeep: -1
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: 'master'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/vswitchperf
+    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: '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: 'vswitchperf'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/master'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**'
+
+    builders:
+        - shell: |
+            pwd
+            cd src
+            make clobber
+            make
+            # run basic sanity test
+            make sanity
+
+- job-template:
+    name: 'vswitchperf-merge-{stream}'
+
+    # builder-merge job to run JJB update
+    #
+    # This job's purpose is to update all the JJB
+
+    project-type: freestyle
+
+    node: opnfv-build
+
+    concurrent: true
+
+    properties:
+        - throttle:
+            enabled: true
+            max-total: 3
+            max-per-node: 2
+
+    logrotate:
+        daysToKeep: 30
+        numToKeep: 40
+        artifactDaysToKeep: -1
+        artifactNumToKeep: 5
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: 'master'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/vswitchperf
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - change-merged-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'remerge'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: 'vswitchperf'
+                branches:
+                    - branch-compare-type: 'ANT'
+                      branch-pattern: '**/master'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**'
+
+    builders:
+        - shell: |
+            pwd
+            cd src
+            make clobber
+            make