Merge "[Dovetail CI] change dovetail CI jobs on Compass"
[releng.git] / jjb / compass4nfv / compass-ci-jobs.yml
index 5c5feee..81d76d5 100644 (file)
@@ -54,7 +54,7 @@
       #        master
       # -------------------------------
       - baremetal-centos:
-          slave-label: 'intel-pod8'
+          slave-label: 'intel-pod17'
           os-version: 'centos7'
           <<: *master
       # -------------------------------
     jobs:
       - 'compass-{scenario}-{pod}-daily-{stream}'
       - 'compass-deploy-{pod}-daily-{stream}'
+      - 'compass-collect-logs-{pod}-daily-{stream}'
 
 ########################
 # job templates
           use-build-blocker: true
           blocking-jobs:
             - 'compass-os-.*?-{pod}-daily-.*?'
+            - 'compass-k8-.*?-{pod}-daily-.*?'
             - 'compass-os-.*?-baremetal-daily-.*?'
+            - 'compass-k8-.*?-baremetal-daily-.*?'
             - 'compass-verify-[^-]*-[^-]*'
           block-level: 'NODE'
 
               build-step-failure-threshold: 'never'
               failure-threshold: 'never'
               unstable-threshold: 'FAILURE'
-      # dovetail only master by now, not sync with A/B/C branches
       # here the stream means the SUT stream, dovetail stream is defined in its own job
-      # only run on os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha scenario
-      # run against SUT master branch, dovetail docker image with latest tag
-      # run against SUT danube branch, dovetail docker image with latest tag(Monday and Sunday)
-      # run against SUT danube branch, dovetail docker image with cvp.X.X.X tag(Tuesday, Thursday, Friday and Saturday)
+      # only run on os-(nosdn|odl_l3)-nofeature-ha scenario
+      # run with testsuite default, dovetail docker image with latest tag(Monday, Tuesday)
+      # run with testsuite proposed_tests, dovetail docker image with latest tag(Thursday, Friday)
       - conditional-step:
           condition-kind: and
           condition-operands:
             - condition-kind: regex-match
-              regex: danube
-              label: '{stream}'
-            - condition-kind: regex-match
-              regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha
+              regex: os-(nosdn|odl_l3)-nofeature-ha
               label: '{scenario}'
             - condition-kind: day-of-week
               day-selector: select-days
               days:
                 MON: true
-                SUN: true
+                TUES: true
               use-build-time: true
           steps:
             - trigger-builds:
-                - project: 'dovetail-compass-{pod}-proposed_tests-{stream}'
+                - project: 'dovetail-compass-{pod}-default-{stream}'
                   current-parameters: false
                   predefined-parameters: |
                     DOCKER_TAG=latest
           condition-kind: and
           condition-operands:
             - condition-kind: regex-match
-              regex: danube
-              label: '{stream}'
-            - condition-kind: regex-match
-              regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha
+              regex: os-(nosdn|odl_l3)-nofeature-ha
               label: '{scenario}'
             - condition-kind: day-of-week
               day-selector: select-days
               days:
-                TUES: true
-                WED: true
                 THURS: true
                 FRI: true
-                SAT: true
               use-build-time: true
           steps:
             - trigger-builds:
           condition-kind: and
           condition-operands:
             - condition-kind: regex-match
-              regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha
+              regex: os-nosdn-nofeature-ha
               label: '{scenario}'
-            - condition-kind: regex-match
-              regex: master
-              label: '{stream}'
           steps:
             - trigger-builds:
-                - project: 'dovetail-compass-{pod}-proposed_tests-{stream}'
+                - project: 'bottlenecks-compass-posca_stress_ping-{pod}-daily-{stream}'
                   current-parameters: false
                   predefined-parameters:
                     DEPLOY_SCENARIO={scenario}
           condition-kind: and
           condition-operands:
             - condition-kind: regex-match
-              regex: os-nosdn-nofeature-ha
-              label: '{scenario}'
+              regex: master
+              label: '{stream}'
           steps:
             - trigger-builds:
-                - project: 'bottlenecks-compass-posca_stress_ping-{pod}-daily-{stream}'
+                - project: 'compass-collect-logs-{pod}-daily-{stream}'
                   current-parameters: false
                   predefined-parameters:
                     DEPLOY_SCENARIO={scenario}
                     failure-threshold: 'never'
                     unstable-threshold: 'FAILURE'
 
+
 - job-template:
     name: 'compass-deploy-{pod}-daily-{stream}'
 
       - build-name:
           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
       - timeout:
-          timeout: 240
+          timeout: 360
           abort: true
       - fix-workspace-permissions
 
             - shell:
                 !include-raw-escape: ./compass-deploy.sh
 
+- job-template:
+    name: 'compass-collect-logs-{pod}-daily-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    concurrent: true
+
+    properties:
+      - logrotate-default
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - compass-ci-parameter:
+          installer: '{installer}'
+          gs-pathname: '{gs-pathname}'
+          ppa-pathname: '{ppa-pathname}'
+      - '{slave-label}-defaults'
+      - '{installer}-defaults'
+
+    scm:
+      - git-scm
+
+    wrappers:
+      - build-name:
+          name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+      - fix-workspace-permissions
+
+    builders:
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - shell:
+          !include-raw-escape: ./compass-logs.sh
+
 ########################
 # parameter macros
 ########################
       - string:
           name: PPA_CACHE
           default: "$WORKSPACE/work/repo/"
+      - string:
+          name: LOG_DIRECTORY
+          default: $WORKSPACE/log_output
+          description: "Directory where the logs will be located upon the completion of the collection."
 
 ########################
 # trigger macros