Merge "Get CSIT branch from build-root/scripts/csit-test-branch"
authorC.J. Collier <cjcollier@linuxfoundation.org>
Thu, 9 Jun 2016 06:21:01 +0000 (06:21 +0000)
committerGerrit Code Review <gerrit@fd.io>
Thu, 9 Jun 2016 06:21:01 +0000 (06:21 +0000)
jjb/csit/csit-vpp-functional.yaml
jjb/nsh_sfc/include-raw-nsh_sfc-build.sh [new file with mode: 0644]
jjb/nsh_sfc/nsh_sfc.yaml [new file with mode: 0644]
jjb/scripts/cleanup_vpp_plugin_dev_env.sh [new file with mode: 0644]
jjb/scripts/setup_vpp_plugin_dev_env.sh [new file with mode: 0644]

index f52f6c2..a798ee1 100644 (file)
 
     publishers:
         - archive-artifacts:
-            artifacts: 'report.html, log.html, output.xml'
+            artifacts: 'report.html, log.html, output.xml, output_perf_data.xml'
             latest-only: false
 
         - robot-report:
             output-path: ''
 
+        - plot:
+            - title: 'RFC2544 binary search with 64B, 1 worker-thread, rss=1, NDR'
+              yaxis: 'Packets Per Second'
+              group: '1_thread'
+              num-builds: '20'
+              keep-records: True
+              series:
+                  - file: 'output_perf_data.xml'
+                    format: xml
+                    xpath-type: 'nodeset'
+                    xpath: '//*[@framesize="64" and contains(@tags,"NDR") and @workerthreads="1"]'
+            - title: 'RFC2544 binary search with 64B, 1 worker-thread, rss=1, PDR=0.5%'
+              yaxis: 'Packets Per Second'
+              group: '1_thread'
+              num-builds: '20'
+              keep-records: True
+              series:
+                  - file: 'output_perf_data.xml'
+                    format: xml
+                    xpath-type: 'nodeset'
+                    xpath: '//*[@framesize="64" and contains(@tags,"PDR") and @workerthreads="1"]'
+
 - job-template:
     name: 'csit-vpp-verify-weekly'
     description: 'Purpose of this job is to validate CSIT code against verified vpp build and apply csit-verified tag in case of success.'
diff --git a/jjb/nsh_sfc/include-raw-nsh_sfc-build.sh b/jjb/nsh_sfc/include-raw-nsh_sfc-build.sh
new file mode 100644 (file)
index 0000000..1d5d27c
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+# basic build script example
+set -e -o pipefail
+# do nothing but print the current slave hostname
+hostname
+export CCACHE_DIR=/tmp/ccache
+if [ -d $CCACHE_DIR ];then
+    echo $CCACHE_DIR exists
+    du -sk $CCACHE_DIR
+else
+    echo $CCACHE_DIR does not exist.  This must be a new slave.
+fi
+
+echo "cat /etc/bootstrap.sha"
+if [ -f /etc/bootstrap.sha ];then
+    cat /etc/bootstrap.sha
+else
+    echo "Cannot find /etc/bootstrap.sha"
+fi
+
+echo "cat /etc/bootstrap-functions.sha"
+if [ -f /etc/bootstrap-functions.sha ];then
+    cat /etc/bootstrap-functions.sha
+else
+    echo "Cannot find /etc/bootstrap-functions.sha"
+fi
+
+echo "sha1sum of this script: ${0}"
+sha1sum $0
+
+scripts/ci/verify.sh
+
+echo "*******************************************************************"
+echo "* NSH_SFC BUILD SUCCESSFULLY COMPLETED"
+echo "*******************************************************************"
diff --git a/jjb/nsh_sfc/nsh_sfc.yaml b/jjb/nsh_sfc/nsh_sfc.yaml
new file mode 100644 (file)
index 0000000..6a21f5c
--- /dev/null
@@ -0,0 +1,172 @@
+- project:
+    name: nsh_sfc
+    jobs:
+        - 'nsh_sfc-verify-{stream}-{os}'
+        - 'nsh_sfc-merge-{stream}-{os}'
+        - 'nsh_sfc-verify-image-{stream}-{os}'
+
+    project: 'nsh_sfc'
+    os:
+        - ubuntu1404:
+            repo-os-part: 'ubuntu.trusty.main'
+        - ubuntu1604:
+            repo-os-part: 'ubuntu.xenial.main'
+        - centos7:
+            repo-os-part: 'centos7'
+    stream:
+        - master:
+            branch: 'master'
+            repo-stream-part: 'master'
+
+- job-template:
+    name: 'nsh_sfc-verify-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'verify-{os}'
+    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}'
+        - os-parameter:
+            os: '{os}'
+        - repo-name-parameter:
+            repo-name: '{repo-stream-part}.{repo-os-part}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - gerrit-trigger-patch-submitted:
+            name: '{project}'
+            branch: '{branch}'
+
+    builders:
+        - shell:
+            !include-raw-escape:
+                - ../scripts/cleanup_vpp_plugin_dev_env.sh
+                - ../scripts/setup_vpp_plugin_dev_env.sh
+                - include-raw-nsh_sfc-build.sh
+                - ../scripts/cleanup_vpp_plugin_dev_env.sh
+
+- job-template:
+    name: 'nsh_sfc-verify-image-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'verify-image-{os}'
+    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}'
+        - os-parameter:
+            os: '{os}'
+        - repo-name-parameter:
+            repo-name: '{repo-stream-part}.{repo-os-part}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - gerrit:
+            server-name: 'Primary'
+            trigger-on:
+                - comment-added-contains-event:
+                    comment-contains-value: 'verify-images'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+            skip-vote:
+                successful: true
+                failed: true
+                unstable: true
+                notbuilt: true
+
+    builders:
+        - shell:
+            !include-raw-escape:
+                - ../scripts/cleanup_vpp_plugin_dev_env.sh
+                - ../scripts/setup_vpp_plugin_dev_env.sh
+                - include-raw-nsh_sfc-build.sh
+                - ../scripts/cleanup_vpp_plugin_dev_env.sh
+
+- job-template:
+    name: 'nsh_sfc-merge-{stream}-{os}'
+
+    project-type: freestyle
+    node: 'merge-{os}'
+
+    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}'
+        - os-parameter:
+            os: '{os}'
+        - repo-name-parameter:
+            repo-name: '{repo-stream-part}.{repo-os-part}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - gerrit-trigger-patch-merged:
+            name: '{project}'
+            branch: '{branch}'
+
+    builders:
+        - shell:
+            !include-raw-escape:
+                - ../scripts/cleanup_vpp_plugin_dev_env.sh
+                - ../scripts/setup_vpp_plugin_dev_env.sh
+                - include-raw-nsh_sfc-build.sh
+                - ../scripts/cleanup_vpp_plugin_dev_env.sh
\ No newline at end of file
diff --git a/jjb/scripts/cleanup_vpp_plugin_dev_env.sh b/jjb/scripts/cleanup_vpp_plugin_dev_env.sh
new file mode 100644 (file)
index 0000000..2273335
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+set -e -o pipefail
+
+# Figure out what system we are running on
+if [ -f /etc/lsb-release ];then
+    . /etc/lsb-release
+elif [ -f /etc/redhat-release ];then
+    sudo yum install -y redhat-lsb
+    DISTRIB_ID=`lsb_release -si`
+    DISTRIB_RELEASE=`lsb_release -sr`
+    DISTRIB_CODENAME=`lsb_release -sc`
+    DISTRIB_DESCRIPTION=`lsb_release -sd`
+fi
+echo DISTRIB_ID: $DISTRIB_ID
+echo DISTRIB_RELEASE: $DISTRIB_RELEASE
+echo DISTRIB_CODENAME: $DISTRIB_CODENAME
+echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
+
+function cleanup {
+    # Setup by installing vpp-dev and vpp-lib
+    if [ $DISTRIB_ID == "Ubuntu" ]; then
+        sudo rm -f /etc/apt/sources.list.d/99fd.io.list
+        sudo dpkg -r vpp-dev vpp-lib vpp-dev vpp-lib vpp vpp-dpdk-dev vpp-dpdk-dkms vpp-dbg
+    elif [[ $DISTRIB_ID == "CentOS" ]]; then
+        sudo rm -f /etc/yum.repos.d/fdio-master.repo
+        sudo yum -y remove vpp-devel vpp-lib vpp
+    fi
+}
+
+trap cleanup EXIT
+cleanup
diff --git a/jjb/scripts/setup_vpp_plugin_dev_env.sh b/jjb/scripts/setup_vpp_plugin_dev_env.sh
new file mode 100644 (file)
index 0000000..1b92adb
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+set -e -o pipefail
+
+#!/bin/bash
+set -e -o pipefail
+
+# Figure out what system we are running on
+if [ -f /etc/lsb-release ];then
+    . /etc/lsb-release
+elif [ -f /etc/redhat-release ];then
+    sudo yum install -y redhat-lsb
+    DISTRIB_ID=`lsb_release -si`
+    DISTRIB_RELEASE=`lsb_release -sr`
+    DISTRIB_CODENAME=`lsb_release -sc`
+    DISTRIB_DESCRIPTION=`lsb_release -sd`
+fi
+echo DISTRIB_ID: $DISTRIB_ID
+echo DISTRIB_RELEASE: $DISTRIB_RELEASE
+echo DISTRIB_CODENAME: $DISTRIB_CODENAME
+echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
+
+function setup {
+    REPO_URL="${NEXUSPROXY}/content/repositories/fd.io.${REPO_NAME}"
+    echo "REPO_URL: ${REPO_URL}"
+    # Setup by installing vpp-dev and vpp-lib
+    if [ $DISTRIB_ID == "Ubuntu" ]; then
+        echo "deb ${REPO_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.list
+        sudo apt-get update
+        sudo apt-get -y --force-yes install vpp-dev vpp-lib
+    elif [[ $DISTRIB_ID == "CentOS" ]]; then
+        sudo cat << EOF > fdio-master.repo
+[fdio-master]
+name=fd.io master branch latest merge
+baseurl=${REPO_URL}
+enabled=1
+gpgcheck=0
+EOF
+        sudo mv fdio-master.repo /etc/yum.repos.d/fdio-master.repo
+        sudo yum -y install vpp-devel vpp-lib
+    fi
+}
+
+setup
\ No newline at end of file