Adding cluster test + some fixes 66/15766/2
authorLuis Gomez <ecelgp@gmail.com>
Wed, 25 Feb 2015 00:05:28 +0000 (16:05 -0800)
committerLuis Gomez <ecelgp@gmail.com>
Thu, 26 Feb 2015 17:10:44 +0000 (09:10 -0800)
Change-Id: I5833551663119d8abe675a9f20ad9f5769342fa1
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
jjb/integration/include-raw-integration-deploy-controller-run-test.sh
jjb/integration/integration-csit.yaml
jjb/integration/integration-macros.yaml

index 33bff71d5a7ee5df2cfb95894809f772d4e1cb62..f9831de43c8fe10dd8cb3ede55ef3083f55a3d1c 100644 (file)
@@ -1,60 +1,65 @@
 # Create a script to run controller inside a dynamic jenkins slave
 CONTROLLERMEM="2048m"
+DISTRIBUTION="karaf"
+
 if [ ${CONTROLLERSCOPE} == 'all' ]; then
     CONTROLLERFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}"
     CONTROLLERMEM="3072m"
+    if [ ${BRANCH} == 'master' ]; then
+        DISTRIBUTION="test"
+    fi
 fi
 
 if [ ${BUNDLEURL} == 'last' ]; then
-    NEXUSPATH="https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf"
+    NEXUSPATH="https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}"
     # Extract the BUNDLEVERSION from the pom.xml
     BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null`
-    echo Bundle version is $BUNDLEVERSION
+    echo "Bundle version is $BUNDLEVERSION"
     # Acquire the timestamp information from maven-metadata.xml
     wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml
     TIMESTAMP=`xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null`
-    echo Nexus timestamp is $TIMESTAMP
-    BUNDLEFOLDER="distribution-karaf-${BUNDLEVERSION}"
-    BUNDLE="distribution-karaf-${TIMESTAMP}.zip"
+    echo "Nexus timestamp is $TIMESTAMP"
+    BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
+    BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip"
     BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
-    echo Distribution bundle URL is ${BUNDLEURL}
+    echo "Distribution bundle URL is ${BUNDLEURL}"
 else
     BUNDLE="$(echo "$BUNDLEURL" | awk -F '/' '{ print $(NF) }')"
     BUNDLEFOLDER="${BUNDLE//.zip}"
 fi
 
 cat > ${WORKSPACE}/controller-script.sh <<EOF
-echo Downloading the distribution from ${BUNDLEURL}
+echo "Downloading the distribution from ${BUNDLEURL}"
 cd /tmp
 wget --no-verbose  ${BUNDLEURL}
 
-echo Extracting the new controller...
+echo "Extracting the new controller..."
 unzip -q ${BUNDLE}
 
-echo Configuring the startup features...
+echo "Configuring the startup features..."
 cd ${BUNDLEFOLDER}/etc
-export CFG=org.apache.karaf.features.cfg
+CFG=org.apache.karaf.features.cfg
 cp \${CFG} \${CFG}.bak
 cat \${CFG}.bak | sed "s/^featuresBoot=.*/featuresBoot=config,standard,region,package,kar,ssh,management,${CONTROLLERFEATURES}/" > \${CFG}
 cat \${CFG}
 
-echo Configuring the log...
-export LOG=org.ops4j.pax.logging.cfg
+echo "Configuring the log..."
+LOG=org.ops4j.pax.logging.cfg
 cp \${LOG} \${LOG}.bak
 cat \${LOG}.bak | sed 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=20MB/' > \${LOG}
 cat \${LOG}
 
-echo Configure max memory...
-export MEM=setenv
+echo "Configure max memory..."
+MEM=setenv
 cd ../bin
 cp \${MEM} \${MEM}.bak
 cat \${MEM}.bak | sed 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/' > \${MEM}
 cat \${MEM}
 
-echo Starting controller...
+echo "Starting controller..."
 ./start &
 
-echo Waiting for controller to come up...
+echo "Waiting for controller to come up..."
 COUNT="0"
 while true; do
     RESP="\$( curl --user admin:admin -sL -w "%{http_code} %{url_effective}\\n" http://localhost:8181/restconf/modules -o /dev/null )"
@@ -72,10 +77,10 @@ while true; do
     fi
 done
 
-echo Cool down for 1 min...
+echo "Cool down for 1 min :)..."
 sleep 60
 
-echo Checking OSGi bundles
+echo "Checking OSGi bundles..."
 ./client 'bundle:list'
 
 EOF
@@ -83,16 +88,16 @@ EOF
 scp ${WORKSPACE}/controller-script.sh $CONTROLLER0:/tmp
 ssh $CONTROLLER0 'bash /tmp/controller-script.sh'
 
-echo Changing the testplan path...
+echo "Changing the testplan path..."
 cat ${WORKSPACE}/test/csit/testplans/${TESTPLAN} | sed "s:integration:${WORKSPACE}:" > testplan.txt
 cat testplan.txt
 
 SUITES=$( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' ' )
 
-echo Starting Robot test suites "${SUITES}" ...
+echo "Starting Robot test suites ${SUITES} ..."
 pybot -N ${TESTPLAN} -c critical -e exclude -v CONTROLLER:${CONTROLLER0} -v MININET:${MININET0} -v MININET_USER:${USER} -v USER_HOME:${HOME} ${TESTOPTIONS} ${SUITES}
 
-echo Fetching Karaf log
+echo "Fetching Karaf log"
 scp $CONTROLLER0:/tmp/$BUNDLEFOLDER/data/log/karaf.log .
 
 # vim: ts=4 sw=4 sts=4 et ft=sh :
index b9714c4bf9222795a9070a6945f5340f07f8c8f1..830f2e6bc4237267f0f5663b795c572b8e5df392 100644 (file)
@@ -1,5 +1,5 @@
 - job-template:
-    name: '{project}-csit-{functionality}-{install}-1node-{stream}'
+    name: '{project}-csit-{functionality}-{install}-1node-imds-{stream}'
 
     project-type: freestyle
     node: dynamic_robot
@@ -13,6 +13,8 @@
     parameters:
         - project-parameter:
             project: 'integration'
+        - integration-branch:
+            branch: '{branch}'
         - integration-bundleurl:
             bundleurl: 'last'
         - integration-controller-scope:
             artifacts: 'karaf.log'
         - email-notification:
             email-prefix: '[{project}]'
+
+- job-template:
+    name: '{project}-csit-{functionality}-{install}-1node-cds-{stream}'
+
+    project-type: freestyle
+    node: dynamic_robot
+
+    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: 'integration'
+        - integration-branch:
+            branch: '{branch}'
+        - integration-bundleurl:
+            bundleurl: 'last'
+        - integration-controller-scope:
+            controller-scope: '{scope}'
+        - integration-controller-features:
+            controller-features: 'odl-mdsal-clustering,{install-features}'
+        - integration-test-options:
+            test-options: '{robot-options}'
+        - integration-test-plan:
+            test-plan: '{project}-{functionality}.txt'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    wrappers:
+        - build-timeout
+        - integration-jclouds-controller-mininet:
+            controller-vms: 1
+            mininet-vms: 1
+        - ssh-agent-credentials:
+            user: '{ssh-credentials}'
+
+    triggers:
+        - reverse:
+            jobs: '{trigger-jobs}'
+            result: 'success'
+
+    builders:
+        - integration-get-slave-addresses
+        - inject:
+            properties-file: 'slave_addresses.txt'
+        - integration-deploy-controller-run-test
+
+    publishers:
+        - integration-robot:
+            unstable-if: 97.0
+            pass-if: 100.0
+        - archive:
+            artifacts: 'karaf.log'
+        - email-notification:
+            email-prefix: '[{project}]'
+
index 1e3a9a3527b3ce108ff65ed5672329604a7e8b4e..a02bf445cd9e3954e7e9fdd5a491ab591cb101af 100644 (file)
@@ -1,3 +1,11 @@
+- parameter:
+    name: integration-branch
+    parameters:
+        - string:
+            name: BRANCH
+            default: '{branch}'
+            description: 'GIT branch'
+
 - parameter:
     name: integration-bundleurl
     parameters: