Java 8 for CSIT jobs. 93/31293/1
authorChaudhry Usama <chaudhryusama@gmail.com>
Mon, 14 Dec 2015 17:36:58 +0000 (09:36 -0800)
committerChaudhry Usama <chaudhryusama@gmail.com>
Mon, 14 Dec 2015 17:38:11 +0000 (09:38 -0800)
Added a parameter to indicate which java version to use and default it by 7

Change-Id: I6a4f19f42528847be9fa0543caa1c1378a6ecbf5
Signed-off-by: Chaudhry Usama <chaudhryusama@gmail.com>
jjb/integration/include-raw-integration-deploy-controller-offline.sh
jjb/integration/include-raw-integration-deploy-controller-run-test.sh
jjb/integration/include-raw-integration-deploy-controller-verify.sh
jjb/integration/include-raw-integration-deploy-controller.sh
jjb/integration/integration-distribution-jobs.yaml
jjb/integration/integration-macros.yaml
jjb/integration/integration-templates.yaml
jjb/integration/integration-test-jobs.yaml

index c22bfcbd201d9050490f97fc44a4e636755714d0..57117c7e5790ae0dd2f26aecab057d9cd5c13b89 100644 (file)
@@ -10,6 +10,19 @@ rm -rf *
 echo "Downloading the distribution..."
 wget --no-verbose  ${ACTUALBUNDLEURL}
 
+if [ ${JDKVERSION} == 'openjdk8' ]; then
+    echo "Setting the JDK Version to 8"
+    sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64/jre/bin/java
+    export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64
+    java -version
+fi
+if [ ${JDKVERSION} == 'openjdk7' ]; then
+    echo "Setting the JDK Version to 7"
+    sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64/jre/bin/java
+    export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64
+    java -version
+fi
+
 echo "Extracting the new controller..."
 unzip -q ${BUNDLE}
 
@@ -36,6 +49,9 @@ MEMCONF=${WORKSPACE}/${BUNDLEFOLDER}/bin/setenv
 sed -ie "s/2048m/${CONTROLLERMEM}/g" ${MEMCONF}
 cat ${MEMCONF}
 
+echo "JDK Version ..."
+java -version
+
 echo "Starting controller..."
 ${WORKSPACE}/${BUNDLEFOLDER}/bin/start
 
index ebc61d29940ab9386588c2c9f0fb7840f9ba5ed1..011f0d2e2379c4f117515443227c74ddb4aad38c 100644 (file)
@@ -26,6 +26,19 @@ fi
 
 cat > ${WORKSPACE}/controller-script.sh <<EOF
 
+if [ ${JDKVERSION} == 'openjdk8' ]; then
+    echo "Setting the JDK Version to 8"
+    sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64/jre/bin/java
+    export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64
+    java -version
+fi
+if [ ${JDKVERSION} == 'openjdk7' ]; then
+    echo "Setting the JDK Version to 7"
+    sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64/jre/bin/java
+    export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64
+    java -version
+fi
+
 echo "Changing to /tmp"
 cd /tmp
 
@@ -56,6 +69,9 @@ cat \${MEMCONF}
 echo "Listing all open ports on controller system..."
 netstat -natu
 
+echo "JDK Version ..."
+java -version
+
 echo "Starting controller..."
 /tmp/${BUNDLEFOLDER}/bin/start
 
index 3a15b14561e144583670995dfad7cad409a52267..9e165a7b46dfc4763c171f6875693eb72b38673c 100644 (file)
@@ -7,6 +7,19 @@ ps axf | grep karaf | grep -v grep | awk '{print "kill -9 " $1}' | sh
 echo "Clean workspace"
 rm -rf *
 
+if [ ${JDKVERSION} == 'openjdk8' ]; then
+    echo "Setting the JDK Version to 8"
+    sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64/jre/bin/java
+    export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64
+    java -version
+fi
+if [ ${JDKVERSION} == 'openjdk7' ]; then
+    echo "Setting the JDK Version to 7"
+    sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64/jre/bin/java
+    export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64
+    java -version
+fi
+
 echo "Downloading the distribution..."
 wget --no-verbose  ${ACTUALBUNDLEURL}
 
@@ -35,6 +48,9 @@ netstat -natu
 echo "redirected karaf console output to karaf_console.log"
 export KARAF_REDIRECT=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log
 
+echo "JDK Version ..."
+java -version
+
 echo "Starting controller..."
 ${WORKSPACE}/${BUNDLEFOLDER}/bin/start
 
index 5aabfb41f96e64f783772c5caa9e985faacd9b82..0b14414017ef9e61dcb57b131af6dd94ac59c535 100644 (file)
@@ -13,6 +13,19 @@ fi
 
 cat > ${WORKSPACE}/deploy-controller-script.sh <<EOF
 
+if [ ${JDKVERSION} == 'openjdk8' ]; then
+    echo "Setting the JDK Version to 8"
+    sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64/jre/bin/java
+    export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64
+    java -version
+fi
+if [ ${JDKVERSION} == 'openjdk7' ]; then
+    echo "Setting the JDK Version to 7"
+    sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64/jre/bin/java
+    export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64
+    java -version
+fi
+
 echo "Changing to /tmp"
 cd /tmp
 
@@ -43,6 +56,9 @@ cat \${MEMCONF}
 echo "Listing all open ports on controller system"
 netstat -natu
 
+echo "JDK Version ..."
+java -version
+
 EOF
 
 for i in `seq 1 ${NUM_ODL_SYSTEM}`
index d8b210ffd10edf77c247aeb1119f0f83f23bc13f..c4d67f30b8e0a79625a66f3d36151b47e089785b 100644 (file)
             branch: '{branch}'
         - integration-bundleurl:
             bundleurl: 'last'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     wrappers:
         - build-timeout
             branch: '{branch}'
         - integration-bundleurl:
             bundleurl: 'last'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     wrappers:
         - build-timeout
index d3b0ce2552d6606e9b30ad9dfef9c7e38afcc29d..6b2bd85ecbb3b154d65d812bac373871abbe1209 100644 (file)
             default: '{bundleurl}'
             description: 'URL to karaf distribution zip'
 
+- parameter:
+    name: integration-jdk-version
+    parameters:
+        - string:
+            name: JDKVERSION
+            default: '{jdkversion}'
+            description: 'Parameter to indicate JAVA Version'
+
 - parameter:
     name: integration-controller-scope
     parameters:
index eb13c97684f927baf546eff8dfbded7abdd9c6e4..dae67aca90f5316c8fd5a9e718d95bfab5333ec5 100644 (file)
@@ -54,6 +54,8 @@
             test-options: '{robot-options}'
         - integration-test-plan:
             test-plan: '{project}-{functionality}.txt'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
             branch: 'stable/helium'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
             test-options: '{robot-options}'
         - integration-test-plan:
             test-plan: '{project}-{functionality}.txt'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
             branch: 'master'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
             branch: 'master'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
             test-options: '{robot-options}'
         - integration-test-plan:
             test-plan: '{project}-{functionality}.txt'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
             branch: 'master'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
             test-plan: '{project}-{functionality}.txt'
         - integration-patch-refspec:
             branch: 'master'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
index ba634e84aaa0ab4d08cff2be4e1e8933c0f6aea1..a4723a0711da46d17854841fc0a7885aaf19d7a6 100644 (file)
             test-plan: 'test-libraries.txt'
         - integration-patch-refspec:
             branch: '$GERRIT_REFSPEC'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     scm:
         - integration-gerrit-scm:
     parameters:
         - integration-bundleurl:
             bundleurl: 'last'
+        - integration-jdk-version:
+            jdkversion: 'openjdk7'
 
     triggers:
         - timed: 'H H * * 6'