Merge "Change the path of images from pre_config/ to images/"
[releng.git] / jjb / kvmfornfv / kvmfornfv.yml
index 17f7cfe..ad497e9 100644 (file)
+---
 - project:
     name: kvmfornfv
-    jobs:
-        - 'kvmfornfv-verify'
-        - 'kvmfornfv-merge'
-        - 'kvmfornfv-daily-{stream}'
-
-    # stream:    branch with - in place of / (eg. stable-arno)
-    # branch:    branch (eg. stable/arno)
-    stream:
-        - master:
-            branch: 'master'
 
-    project: 'kvmfornfv'
+    project: '{name}'
 
+    stream:
+      - master:
+          branch: '{stream}'
+          gs-pathname: ''
+          disabled: false
+      - euphrates:
+          branch: 'stable/{stream}'
+          gs-pathname: '/{stream}'
+          disabled: true
+    #####################################
+    # patch verification phases
+    #####################################
+    phase:
+      - 'build':
+          slave-label: 'opnfv-build-ubuntu'
+      - 'test':
+          slave-label: 'intel-pod10'
+    #####################################
+    # patch verification phases
+    #####################################
+    testname:
+      - 'cyclictest'
+      - 'packet_forward'
+      - 'livemigration'
+    #####################################
+    # patch verification phases
+    #####################################
+    jobs:
+      - 'kvmfornfv-verify-{stream}'
+      - 'kvmfornfv-verify-{phase}-{stream}'
+      - 'kvmfornfv-merge-{stream}'
+      - 'kvmfornfv-daily-{stream}'
+      - 'kvmfornfv-daily-build-{stream}'
+      - 'kvmfornfv-{testname}-daily-test-{stream}'
+
+#####################################
+# job templates
+#####################################
 - job-template:
-    name: 'kvmfornfv-verify'
+    name: 'kvmfornfv-verify-{stream}'
+
+    project-type: multijob
 
-    node: ericsson-build
+    disabled: '{obj:disabled}'
 
-    project-type: freestyle
+    concurrent: true
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
+    properties:
+      - logrotate-default
+      - throttle:
+          enabled: true
+          max-total: 3
+          option: 'project'
 
     parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: 'master'
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+
+    triggers:
+      - gerrit:
+          server-name: 'gerrit.opnfv.org'
+          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}'
+              disable-strict-forbidden-file-verification: 'true'
+              forbidden-file-paths:
+                - compare-type: ANT
+                  pattern: 'docs/**'
+
+    builders:
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - multijob:
+          name: build
+          condition: SUCCESSFUL
+          projects:
+            - name: 'kvmfornfv-verify-build-{stream}'
+              current-parameters: false
+              predefined-parameters: |
+                BRANCH=$BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+              node-parameters: false
+              kill-phase-on: FAILURE
+              abort-all-job: true
+      - multijob:
+          name: test
+          condition: SUCCESSFUL
+          projects:
+            - name: 'kvmfornfv-verify-test-{stream}'
+              current-parameters: false
+              predefined-parameters: |
+                BRANCH=$BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+              node-parameters: false
+              kill-phase-on: FAILURE
+              abort-all-job: true
+
+- job-template:
+    name: 'kvmfornfv-verify-{phase}-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    concurrent: true
 
     scm:
-        - gerrit-trigger-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: '$GERRIT_REFSPEC'
-            choosing-strategy: 'gerrit'
+      - git-scm-gerrit
 
     wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
+      - ssh-agent-wrapper
+      - timeout:
+          timeout: 360
+          fail: true
 
-    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: 'kvmfornfv'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/master'
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - '{slave-label}-defaults'
+      - 'kvmfornfv-defaults':
+          gs-pathname: '{gs-pathname}'
+      - string:
+          name: PHASE
+          default: '{phase}'
+          description: "Execution of kvmfornfv daily '{phase}' job ."
 
     builders:
-        - shell:
-            echo "Hello World"
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - '{project}-verify-{phase}-macro'
 
 - job-template:
-    name: 'kvmfornfv-merge'
+    name: 'kvmfornfv-merge-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+      - 'kvmfornfv-defaults':
+          gs-pathname: '{gs-pathname}'
+
+    scm:
+      - git-scm
 
-    # builder-merge job to run JJB update
-    #
-    # This job's purpose is to update all the JJB
+    triggers:
+      - 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}'
+
+    builders:
+      - shell:
+          !include-raw: ./kvmfornfv-build.sh
+
+- job-template:
+    name: 'kvmfornfv-daily-{stream}'
 
-    node: master
+    project-type: multijob
 
-    project-type: freestyle
+    disabled: '{obj:disabled}'
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 40
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
+    concurrent: false
 
     parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: 'master'
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+      - 'kvmfornfv-defaults':
+          gs-pathname: '{gs-pathname}'
 
     scm:
-        - gerrit-trigger-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            choosing-strategy: 'default'
-
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
+      - git-scm
 
     triggers:
-        - gerrit:
-            trigger-on:
-                - change-merged-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'remerge'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'kvmfornfv'
-                branches:
-                    - branch-compare-type: 'ANT'
-                      branch-pattern: '**/master'
+      - timed: '@midnight'
 
     builders:
-        - shell:
-            echo "Hello World"
-
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - multijob:
+          name: cyclictest-build
+          condition: SUCCESSFUL
+          projects:
+            - name: 'kvmfornfv-daily-build-{stream}'
+              current-parameters: false
+              node-parameters: false
+              git-revision: true
+              kill-phase-on: FAILURE
+              abort-all-job: true
+      - multijob:
+          name: cyclictest-test
+          condition: SUCCESSFUL
+          projects:
+            - name: 'kvmfornfv-cyclictest-daily-test-{stream}'
+              current-parameters: false
+              node-parameters: false
+              git-revision: true
+              kill-phase-on: FAILURE
+              abort-all-job: true
+      - multijob:
+          name: packetforward-test
+          condition: SUCCESSFUL
+          projects:
+            - name: 'kvmfornfv-packet_forward-daily-test-{stream}'
+              current-parameters: false
+              node-parameters: false
+              git-revision: true
+              kill-phase-on: FAILURE
+              abort-all-job: true
+      - multijob:
+          name: livemigration-test
+          condition: SUCCESSFUL
+          projects:
+            - name: 'kvmfornfv-livemigration-daily-test-{stream}'
+              current-parameters: false
+              node-parameters: false
+              git-revision: true
+              kill-phase-on: FAILURE
+              abort-all-job: true
 
 - job-template:
-    name: 'kvmfornfv-daily-{stream}'
+    name: 'kvmfornfv-daily-build-{stream}'
 
-    # Job template for daily builders
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-    node: master
+    disabled: '{obj:disabled}'
 
-    disabled: true
+    concurrent: false
 
-    project-type: freestyle
-
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-artifact-num-to-keep}'
+    scm:
+      - git-scm
 
+    wrappers:
+      - ssh-agent-wrapper
+      - timeout:
+          timeout: 360
+          fail: true
     parameters:
-        - project-parameter:
-            project: '{project}'
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+      - 'kvmfornfv-defaults':
+          gs-pathname: '{gs-pathname}'
+      - string:
+          name: PHASE
+          default: 'build'
+          description: "Execution of kvmfornfv daily 'build' job ."
+
+    builders:
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - '{project}-daily-build-macro'
+
+- job-template:
+    name: 'kvmfornfv-{testname}-daily-test-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    concurrent: false
 
     scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
+      - git-scm
 
     wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
+      - ssh-agent-wrapper
+      - timeout:
+          timeout: 360
+          fail: true
 
-    triggers:
-        - timed: 'H H * * *'
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'intel-pod10-defaults'
+      - 'kvmfornfv-defaults':
+          gs-pathname: '{gs-pathname}'
+      - string:
+          name: TEST_NAME
+          default: '{testname}'
+          description: "Daily job to execute kvmfornfv '{testname}' testcase."
+      - string:
+          name: PHASE
+          default: 'test'
+          description: "Execution of kvmfornfv daily 'test' job ."
+
+    builders:
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - '{project}-{testname}-daily-test-macro'
+
+#####################################
+# builder macros
+#####################################
+- builder:
+    name: 'kvmfornfv-verify-build-macro'
+    builders:
+      - shell:
+          !include-raw: ./kvmfornfv-build.sh
+      - shell:
+          !include-raw: ./kvmfornfv-upload-artifact.sh
+
+- builder:
+    name: 'kvmfornfv-verify-test-macro'
+    builders:
+      - shell:
+          !include-raw: ./kvmfornfv-download-artifact.sh
+      - shell:
+          !include-raw: ./kvmfornfv-test.sh
 
+- builder:
+    name: 'kvmfornfv-daily-build-macro'
     builders:
-        - shell:
-             echo "Hello World"
+      - shell:
+          !include-raw: ./kvmfornfv-build.sh
+      - shell:
+          !include-raw: ./kvmfornfv-upload-artifact.sh
+
+- builder:
+    name: 'kvmfornfv-cyclictest-daily-test-macro'
+    builders:
+      - shell:
+          !include-raw: ./kvmfornfv-download-artifact.sh
+      - shell:
+          !include-raw: ./kvmfornfv-test.sh
+      - shell:
+          !include-raw: ./kvmfornfv-upload-artifact.sh
+
+- builder:
+    name: 'kvmfornfv-packet_forward-daily-test-macro'
+    builders:
+      - shell:
+          !include-raw: ./kvmfornfv-download-artifact.sh
+      - shell:
+          !include-raw: ./kvmfornfv-test.sh
+
+- builder:
+    name: 'kvmfornfv-livemigration-daily-test-macro'
+    builders:
+      - shell:
+          !include-raw: ./kvmfornfv-download-artifact.sh
+      - shell:
+          !include-raw: ./kvmfornfv-test.sh
+
+#####################################
+# parameter macros
+#####################################
+- parameter:
+    name: 'kvmfornfv-defaults'
+    parameters:
+      - string:
+          name: GS_URL
+          default: artifacts.opnfv.org/$PROJECT{gs-pathname}
+          description: "URL to Google Storage."