Add ovs integration tests for netvirt 03/37403/2
authorSam Hague <shague@redhat.com>
Sun, 10 Apr 2016 11:41:58 +0000 (07:41 -0400)
committerSam Hague <shague@redhat.com>
Sun, 10 Apr 2016 12:19:38 +0000 (08:19 -0400)
Change-Id: I6d20efc3ac861275b4f83fa2d421f0be8389e128
Signed-off-by: Sam Hague <shague@redhat.com>
jjb/netvirt/include-raw-cleanup-docker.sh [new file with mode: 0644]
jjb/netvirt/include-raw-setup-docker.sh [new file with mode: 0644]
jjb/netvirt/netvirt-full-integration.yaml [new file with mode: 0644]

diff --git a/jjb/netvirt/include-raw-cleanup-docker.sh b/jjb/netvirt/include-raw-cleanup-docker.sh
new file mode 100644 (file)
index 0000000..014178c
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+echo "---> Cleaning up OVS $OVS_VERSION"
+docker logs $CID > $WORKSPACE/docker-ovs-${OVS_VERSION}.log
+docker stop $CID
+docker rm $CID
+rm env.properties
+
+docker images
diff --git a/jjb/netvirt/include-raw-setup-docker.sh b/jjb/netvirt/include-raw-setup-docker.sh
new file mode 100644 (file)
index 0000000..6056b74
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -e
+
+OVS_VERSION=${OVS_VERSION:-2.3.2}
+
+echo "---> Cleaning up existing Docker processes and images"
+for x in $(docker ps -a -q)
+do
+   docker stop "$x"
+   docker rm "$x"
+done
+
+for x in $(docker images | egrep -e 'davetucker|mgkwill|socketplane' | awk '{print $3}')
+do
+   docker rmi "$x"
+done
+
+
+
+echo "---> Starting OVS $OVS_VERSION"
+/usr/bin/docker pull mgkwill/openvswitch:$OVS_VERSION
+CID=$(/usr/bin/docker run -p 6641:6640 --privileged=true -d -i -t mgkwill/openvswitch:$OVS_VERSION /usr/bin/supervisord)
+REALCID=`echo $CID | rev | cut -d ' ' -f 1 | rev`
+echo "CID=$REALCID" > env.properties
+echo "OVS_VERSION=${OVS_VERSION}" >> env.properties
+CONTROLLER_IP=`facter ipaddress`
+echo "CONTROLLER_IP=${CONTROLLER_IP}" >> env.properties
+
+echo "---> Waiting..."
+sleep 10
diff --git a/jjb/netvirt/netvirt-full-integration.yaml b/jjb/netvirt/netvirt-full-integration.yaml
new file mode 100644 (file)
index 0000000..75986c3
--- /dev/null
@@ -0,0 +1,120 @@
+- project:
+    name: netvirt-full-integration
+    jobs:
+        - 'netvirt-daily-full-integration-{stream}'
+
+    # stream:    release stream (eg. stable-lithium or beryllium)
+    # branch:    git branch (eg. stable/lithium or master)
+    stream:
+        - boron:
+            branch: 'master'
+            jdk: openjdk8
+            jdks:
+                - openjdk8
+        - beryllium:
+            branch: 'stable/beryllium'
+            jdk: openjdk8
+            jdks:
+                - openjdk8
+        - stable-lithium:
+            branch: 'stable/lithium'
+            jdk: openjdk7
+            jdks:
+                - openjdk7
+
+    project: 'netvirt'
+
+- job-template:
+    name: 'netvirt-daily-full-integration-{stream}'
+
+    # Required Variables:
+    #     stream:    release stream (eg. stable-lithium or beryllium)
+    #     branch:    git branch (eg. stable/lithium or master)
+
+    project-type: matrix
+    node: matrix_master
+    description: 'Integration tests for the netvirt project against different versions of OVS and branches. This job runs nightly. '
+    execution-strategy:
+        sequential: true
+
+    axes:
+        - axis:
+            type: user-defined
+            name: 'OVS_VERSION'
+            values:
+                - 2.3.2
+                - 2.4.0
+        - axis:
+            type: jdk
+            values: '{obj:jdks}'
+
+        - axis:
+            type: slave
+            name: nodes
+            values:
+                - dynamic_docker
+
+    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:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    wrappers:
+        - timeout:
+            fail: true
+            timeout: 360
+            timeout-var: 'BUILD_TIMEOUT'
+            type: absolute
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+
+    triggers:
+        - timed: '@midnight'
+
+    builders:
+        - wipe-org-opendaylight-repo
+        - shell:
+            !include-raw-escape:
+                - include-raw-setup-docker.sh
+        - inject:
+            properties-file: env.properties
+        - maven-target:
+            maven-version: '{mvn33}'
+            pom: 'pom.xml'
+            goals: 'clean install -V verify -Pintegrationtest -Dskip.karaf.featureTest=true -Dmaven.compile.fork=true -Dovsdb.controller.address=${{CONTROLLER_IP}}'
+            properties:
+                - 'ovsdbserver.ipaddress=127.0.0.1'
+                - 'ovsdbserver.port=6641'
+                - 'ovsdb.userspace.enabled=yes'
+                - 'maven.repo.local=/tmp/r'
+                - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
+                - 'stream={stream}'
+            java-opts:
+                - '-Xmx1024m -XX:MaxPermSize=256m'
+            settings: '{netvirt-settings}'
+            global-settings: '{odl-global-settings}'
+        - shell:
+            !include-raw-escape:
+                - include-raw-cleanup-docker.sh
+        - jacoco-nojava-workaround
+
+    publishers:
+        - archive:
+            artifacts: 'docker-ovs-*.log'
+            fingerprint: false
+        - email-notification:
+            email-prefix: '[netvirt]'