Making release test job more generic and hardening the deploy script to accept *any... 82/17082/2
authorLuis Gomez <ecelgp@gmail.com>
Sun, 22 Mar 2015 10:40:51 +0000 (03:40 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Sun, 22 Mar 2015 10:46:55 +0000 (03:46 -0700)
Change-Id: I87e7f316d545fa115a80ac0650a87772563fa173
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
jjb/integration/include-raw-integration-deploy-controller-offline.sh
jjb/integration/include-raw-integration-deploy-controller-run-test.sh
jjb/integration/integration-distribution-test.yaml [moved from jjb/integration/integration-release-stable-helium.yaml with 86% similarity]

index 6e0e4d69f220c8866a2cd7c677aafaf76e2c05c2..077c56ed5779f7575b68ed5204048e3325bcb9e9 100644 (file)
@@ -7,20 +7,26 @@ if [ ${BUNDLEURL} == 'last' ]; then
     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"
+    echo "Nexus timestamp is ${TIMESTAMP}"
     BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
     BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip"
     BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
-    echo "Distribution bundle URL is ${BUNDLEURL}"
 else
-    BUNDLE="$(echo "$BUNDLEURL" | awk -F '/' '{ print $(NF) }')"
-    BUNDLEFOLDER="${BUNDLE//.zip}"
+    BUNDLE="$(echo ${BUNDLEURL} | awk -F '/' '{ print $(NF) }')"
+    echo "Finding out Bundle folder..."
+    wget --no-verbose  ${BUNDLEURL}
+    BUNDLEFOLDER="$(unzip -qql ${BUNDLE} | head -n1 | tr -s ' ' | cut -d' ' -f5- | rev | cut -c 2- | rev)"
+    rm ${BUNDLE}
 fi
 
+echo "Distribution bundle URL is ${BUNDLEURL}"
+echo "Distribution bundle is ${BUNDLE}"
+echo "Distribution folder is ${BUNDLEFOLDER}"
+
 echo "Downloading the distribution from ${BUNDLEURL}"
 wget --no-verbose  ${BUNDLEURL}
 
index fc5f6d7c7223f8c47f78ab0dc838cf6ca016a74a..8611e1ab1f64210eaae6bf30dffc2eca4a40a701 100644 (file)
@@ -11,20 +11,26 @@ if [ ${BUNDLEURL} == 'last' ]; then
     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"
+    echo "Nexus timestamp is ${TIMESTAMP}"
     BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
     BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip"
     BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
-    echo "Distribution bundle URL is ${BUNDLEURL}"
 else
-    BUNDLE="$(echo "$BUNDLEURL" | awk -F '/' '{ print $(NF) }')"
-    BUNDLEFOLDER="${BUNDLE//.zip}"
+    BUNDLE="$(echo ${BUNDLEURL} | awk -F '/' '{ print $(NF) }')"
+    echo "Finding out Bundle folder..."
+    wget --no-verbose  ${BUNDLEURL}
+    BUNDLEFOLDER="$(unzip -qql ${BUNDLE} | head -n1 | tr -s ' ' | cut -d' ' -f5- | rev | cut -c 2- | rev)"
+    rm ${BUNDLE}
 fi
 
+echo "Distribution bundle URL is ${BUNDLEURL}"
+echo "Distribution bundle is ${BUNDLE}"
+echo "Distribution folder is ${BUNDLEFOLDER}"
+
 cat > ${WORKSPACE}/controller-script.sh <<EOF
 echo "Downloading the distribution from ${BUNDLEURL}"
 cd /tmp
@@ -67,8 +73,9 @@ while true; do
         break
     elif (( "\$COUNT" > "600" )); then
         echo Timeout Controller DOWN
-        echo "Fetching Karaf log"
-        scp ${CONTROLLER0}:/tmp/${BUNDLEFOLDER}/data/log/karaf.log .
+        echo "Dumping Karaf log..."
+        cd ../data/log
+        cat karaf.log
         exit 1
     else
         COUNT=\$(( \${COUNT} + 5 ))
@@ -85,7 +92,7 @@ echo "Checking OSGi bundles..."
 
 EOF
 
-scp ${WORKSPACE}/controller-script.sh $CONTROLLER0:/tmp
+scp ${WORKSPACE}/controller-script.sh ${CONTROLLER0}:/tmp
 ssh ${CONTROLLER0} 'bash /tmp/controller-script.sh'
 
 echo "Changing the testplan path..."
similarity index 86%
rename from jjb/integration/integration-release-stable-helium.yaml
rename to jjb/integration/integration-distribution-test.yaml
index 990bdb1b6f9f44e161718fa9f9266017b16f6915..f3ba5d4145a684fce98b74b1cbfe763e52e2362a 100644 (file)
@@ -1,16 +1,17 @@
 - project:
-    name: integration-release-stable-helium
+    name: integration-distribution-test
     jobs:
-        - 'integration-test-release-{stream}'
+        - 'integration-distribution-test-{stream}'
 
     # stream:    branch with - in place of / (eg. stable-helium)
     # branch:    branch (eg. stable/helium)
     stream:
         - stable-helium:
             branch: 'stable/helium'
+            csit-list: 'controller-csit-1node-imds-nsf-only-{stream},controller-csit-1node-imds-nsf-all-{stream},aaa-csit-1node-imds-authn-only-{stream},aaa-csit-1node-imds-authn-all-{stream},openflowplugin-csit-1node-imds-flow-services-only-{stream},openflowplugin-csit-1node-imds-flow-services-all-{stream},l2switch-csit-1node-imds-switch-only-{stream},l2switch-csit-1node-imds-switch-all-{stream},vtn-csit-1node-imds-manager-only-{stream},vtn-csit-1node-imds-manager-all-{stream},lispflowmapping-csit-1node-imds-all-only-{stream},lispflowmapping-csit-1node-imds-all-all-{stream}'
 
 - job-template:
-    name: 'integration-test-release-{stream}'
+    name: 'integration-distribution-test-{stream}'
 
     # Job template for ODL Integration Release Tests
     #
@@ -33,7 +34,7 @@
 
     builders:
         - trigger-builds:
-            - project: 'controller-csit-1node-imds-nsf-only-{stream},controller-csit-1node-imds-nsf-all-{stream},aaa-csit-1node-imds-authn-only-{stream},aaa-csit-1node-imds-authn-all-{stream},openflowplugin-csit-1node-imds-flow-services-only-{stream},openflowplugin-csit-1node-imds-flow-services-all-{stream},l2switch-csit-1node-imds-switch-only-{stream},l2switch-csit-1node-imds-switch-all-{stream},vtn-csit-1node-imds-manager-only-{stream},vtn-csit-1node-imds-manager-all-{stream},lispflowmapping-csit-1node-imds-all-only-{stream},lispflowmapping-csit-1node-imds-all-all-{stream}'
+            - project: '{csit-list}'
               block: true
               predefined-parameters:
                   BUNDLEURL=$BUNDLEURL