CSIT-1117: Update jenkins job infrastructure for 2n/3n testing 46/13446/2
authorTibor Frank <tifrank@cisco.com>
Thu, 12 Jul 2018 10:35:30 +0000 (12:35 +0200)
committerTibor Frank <tifrank@cisco.com>
Thu, 12 Jul 2018 10:41:19 +0000 (12:41 +0200)
 + 'csit-dpdk-perf-{stream}-{topo}-{arch}'
   - {stream} [branch_id]
   - {topo} [2n|3n]
   - {arch} [skx|hsw|arm]

Change-Id: Id179cd1152d0f77bf2ad559603eb9bc964ef9216
Signed-off-by: Tibor Frank <tifrank@cisco.com>
jjb/csit/csit.yaml
jjb/csit/include-raw-csit-dpdk-perf-verify.sh [new file with mode: 0644]

index d6e1ffc..8865090 100644 (file)
@@ -37,6 +37,7 @@
         - 'csit-report-merge-1801_2'
         - 'csit-trending-daily-master'
         - 'csit-dpdk-perf-{stream}-{type}'
+        - 'csit-dpdk-perf-verify-{stream}-{topo}-{arch}'
         - 'csit-dpdk-perf-mrr-weekly-master'
         - 'csit-ligato-perf-{stream}-{type}'
         - 'csit-vpp-perf-{stream}-{type}'
         - fdio-infra-shiplogs:
             maven-version: 'mvn33-new'
 
+- job-template:
+    name: 'csit-dpdk-perf-verify-{stream}-{topo}-{arch}'
+
+    description: |
+      <ul>
+          <li>objective
+              <ul>
+                  <li>perf verify - per csit gerrit patch
+              </ul>
+          <li>job
+              <ul>
+                  <li>name: <b>csit-dpdk-perf-verify-{stream}-{topo}-{arch}</b>
+                  <li>trigger: keyword in comment to csit patch:
+                      <b>csit-dpdk-{topo}-{arch}-perftest tag_list</b>
+              </ul>
+          <li>perf test-cases selection
+              <ul>
+                  <li>test-cases selected using trigger keyword followed by tags
+                  <li>all test-cases are labelled with CSIT RF topic tags
+                      defined in <i>csit/docs/tag_documentation.rst</i>
+              </ul>
+          <li>default tags for dpdk perf test type
+              <ul>
+                  <li>IP4BASE, L2XCBASE
+                  <li>64B: 64B packet size
+                  <li>1C: one core
+                  <li>X710: x710 Fortville NIC
+                  <li>MRR: MRR throughput
+              </ul>
+          <li>results
+              <ul>
+                  <li>jjb verify: PASS/FAIL
+                  <li>present: no
+                  <li>analyse: no
+              </ul>
+      </ul>
+
+    project-type: freestyle
+    node: 'ubuntu1604-basebuild-4c-4g'
+    concurrent: true
+
+    logrotate:
+        daysToKeep: '{build-days-to-keep}'
+        numToKeep: '{build-num-to-keep}'
+        artifactDaysToKeep: '{build-artifact-days-to-keep}'
+        artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: 'jenkins-gerrit-credentials'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - fdio-infra-wrappers-non-activity-timeout:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - gerrit:
+            server-name: 'Primary'
+            trigger-on:
+                - comment-added-contains-event:
+                    comment-contains-value: 'csit-dpdk-{topo}-{arch}-perftest'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+            skip-vote:
+                successful: false
+                failed: false
+                unstable: false
+                notbuilt: false
+
+    builders:
+        - shell:
+            !include-raw-escape: jjb/csit/include-raw-csit-dpdk-perf-verify.sh
+
+    publishers:
+        - archive-artifacts:
+            artifacts: 'archive/*.*'
+            latest-only: false
+
+        - robot:
+            output-path: archive
+            other-files:
+              - '*.*'
+
+        - fdio-infra-shiplogs:
+            maven-version: 'mvn33-new'
+
 - job-template:
     name: 'csit-vpp-perf-{stream}-{type}'
 
                   <li>analyse: no
               </ul>
       </ul>
+
     project-type: freestyle
     node: 'ubuntu1604-basebuild-4c-4g'
     concurrent: true
diff --git a/jjb/csit/include-raw-csit-dpdk-perf-verify.sh b/jjb/csit/include-raw-csit-dpdk-perf-verify.sh
new file mode 100644 (file)
index 0000000..8e6baa7
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -xeu -o pipefail
+
+if [[ ${GERRIT_EVENT_TYPE} == 'comment-added' ]]; then
+    TRIGGER=`echo ${GERRIT_EVENT_COMMENT_TEXT} \
+        | grep -oE '(perftest$|perftest[[:space:]].+$)'`
+else
+    TRIGGER=''
+fi
+# Export test type.
+export TEST_TAG="VERIFY-PERF-PATCH"
+# Export test tags as string.
+export TEST_TAG_STRING=${TRIGGER#$"perftest"}
+
+# execute csit bootstrap script if it exists
+if [ ! -e bootstrap-verify-perf-DPDK.sh ]
+then
+    echo 'ERROR: No bootstrap-verify-perf-DPDK.sh found'
+    exit 1
+fi
+
+# make sure that bootstrap-verify-perf-DPDK.sh is executable
+chmod +x bootstrap-verify-perf-DPDK.sh
+# run the script
+./bootstrap-verify-perf-DPDK.sh
+
+# vim: ts=4 ts=4 sts=4 et :