X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-get-bundle-vars.sh;h=6b57c40272c8262ae5a7e4d9524b41f91de19928;hb=b44aaa0cfbb05c8250c06d9dac16085f1e9ac732;hp=c2f592a7c5b5b22b2b570c432dc96e4479c24fa5;hpb=7151b63f96733b70ff8c6cefe1425f7ecbe29dcd;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 c2f592a7c..6b57c4027 100644 --- a/jjb/integration/include-raw-integration-get-bundle-vars.sh +++ b/jjb/integration/include-raw-integration-get-bundle-vars.sh @@ -3,15 +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 # 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" + 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}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf" + 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` @@ -19,6 +22,11 @@ if [ ${BUNDLEURL} == 'last' ]; then BUNDLEFOLDER="distribution-karaf-${BUNDLEVERSION}" BUNDLE="distribution-karaf-${TIMESTAMP}.zip" ACTUALBUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}" +elif [[ ${BUNDLEURL} == *"distribution-check"* ]]; then + ACTUALBUNDLEURL="${BUNDLEURL}" + BUNDLE="${BUNDLEURL##*/}" + BUNDLEFOLDER="${BUNDLE//.zip}" + BUNDLEVERSION="${BUNDLEFOLDER//distribution-karaf-}" else ACTUALBUNDLEURL="${BUNDLEURL}" BUNDLE="${BUNDLEURL##*/}"