X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fintegration%2Finclude-raw-integration-get-bundle-vars.sh;h=6c5f5cb467ca5193640c2bf13167d898cbc7e424;hb=6f286ffab2dbbba04e83ecc8ced0930010ba60ef;hp=fb07c17d8443577694d81906d704518824fbaa5d;hpb=2074d6c606284db9e707000451ca3c131323a0f8;p=releng%2Fbuilder.git diff --git a/jjb/integration/include-raw-integration-get-bundle-vars.sh b/jjb/integration/include-raw-integration-get-bundle-vars.sh index fb07c17d8..6c5f5cb46 100644 --- a/jjb/integration/include-raw-integration-get-bundle-vars.sh +++ b/jjb/integration/include-raw-integration-get-bundle-vars.sh @@ -3,13 +3,18 @@ echo "## Inject Global Variables ##" echo "#################################################" NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org} +ODL_NEXUS_REPO=${ODL_NEXUS_REPO:-content/repositories/opendaylight.snapshot} +GERRIT_PATH=${GERRIT_PATH:-git.opendaylight.org/gerrit} +DISTROBRANCH=${DISTROBRANCH:-$GERRIT_BRANCH} if [ ${BUNDLEURL} == 'last' ]; then - NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf" + # Obtain current pom.xml of integration/distribution, correct branch. + wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml" # Extract the BUNDLEVERSION from the pom.xml BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null` echo "Bundle version is ${BUNDLEVERSION}" # Acquire the timestamp information from maven-metadata.xml + NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/integration/distribution-karaf" wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml less maven-metadata.xml TIMESTAMP=`xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null` @@ -20,8 +25,16 @@ if [ ${BUNDLEURL} == 'last' ]; then else ACTUALBUNDLEURL="${BUNDLEURL}" BUNDLE="${BUNDLEURL##*/}" - BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))" - BUNDLEFOLDER="distribution-karaf-${BUNDLEVERSION}" + BUNDLEFOLDER="${BUNDLE//.zip}" + BUNDLEVERSION="${BUNDLEFOLDER//distribution-karaf-}" +fi + +if [ ${JDKVERSION} == 'openjdk8' ]; then + echo "Preparing for JRE Version 8" + JAVA_HOME="/usr/lib/jvm/java-1.8.0" +elif [ ${JDKVERSION} == 'openjdk7' ]; then + echo "Preparing for JRE Version 7" + JAVA_HOME="/usr/lib/jvm/java-1.7.0" fi echo "Distribution bundle URL is ${ACTUALBUNDLEURL}" @@ -29,6 +42,7 @@ echo "Distribution bundle is ${BUNDLE}" echo "Distribution bundle version is ${BUNDLEVERSION}" echo "Distribution folder is ${BUNDLEFOLDER}" echo "Nexus prefix is ${NEXUSURL_PREFIX}" +echo "Java home is ${JAVA_HOME}" cat > ${WORKSPACE}/bundle_vars.txt <