Java 8 for CSIT jobs.
[releng/builder.git] / jjb / integration / include-raw-integration-deploy-controller-offline.sh
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