X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-get-bundle-vars.sh;h=c2f592a7c5b5b22b2b570c432dc96e4479c24fa5;hb=712f5f29e96ba5c0c1b40a6756535db1d27b3af4;hp=1698578db8deb9ef08cf306b018dbb1f8dfb6c1c;hpb=8a4b303d3cfab90125af7772a7a872a78e229d52;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 1698578db..c2f592a7c 100644 --- a/jjb/integration/include-raw-integration-get-bundle-vars.sh +++ b/jjb/integration/include-raw-integration-get-bundle-vars.sh @@ -1,63 +1,54 @@ echo "#################################################" -echo "## include-raw-integration-get-bundle_vars.txt ##" +echo "## Inject Global Variables ##" echo "#################################################" -set -x -# Create a script to run controller inside a dynamic jenkins slave -CONTROLLERMEM="2048m" -DISTRIBUTION="karaf" - - - -if [ ${CONTROLLERSCOPE} == 'all' ]; then - CONTROLLERFEAT="odl-integration-compatible-with-all,${CONTROLLERFEATURES}" - CONTROLLERMEM="3072m" -fi NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org} if [ ${BUNDLEURL} == 'last' ]; then - NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}" + # Obtain current pom.xml of integration/distribution, correct branch. + wget "http://git.opendaylight.org/gerrit/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$BRANCH" -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}/content/repositories/opendaylight.snapshot/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` echo "Nexus timestamp is ${TIMESTAMP}" - BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}" - BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip" - BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}" + BUNDLEFOLDER="distribution-karaf-${BUNDLEVERSION}" + BUNDLE="distribution-karaf-${TIMESTAMP}.zip" + ACTUALBUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}" else + ACTUALBUNDLEURL="${BUNDLEURL}" BUNDLE="${BUNDLEURL##*/}" BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))" - BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}" + BUNDLEFOLDER="distribution-karaf-${BUNDLEVERSION}" fi -echo "Distribution bundle URL is ${BUNDLEURL}" +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}" echo "Distribution bundle is ${BUNDLE}" +echo "Distribution bundle version is ${BUNDLEVERSION}" echo "Distribution folder is ${BUNDLEFOLDER}" - - -# write the BUNDLE values into a HERE doc to later -# export to jenkins +echo "Nexus prefix is ${NEXUSURL_PREFIX}" +echo "Java home is ${JAVA_HOME}" cat > ${WORKSPACE}/bundle_vars.txt <