X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-detect-variables.sh;h=fddb2f9670396a5b9bc1778e4fe2f2d1d563c829;hb=b206638a7a9195440951002d51a15d69bef71ad5;hp=542b0dcc1eac95dfd097cf2c68a0ef78328f5cbe;hpb=321d2beb638ea788003884f7aefdde104464c0cc;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-detect-variables.sh b/jjb/integration/integration-detect-variables.sh index 542b0dcc1..fddb2f967 100644 --- a/jjb/integration/integration-detect-variables.sh +++ b/jjb/integration/integration-detect-variables.sh @@ -1,18 +1,28 @@ - +#!/bin/bash # TODO: Document the default values. 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 [ ${BUNDLE_URL} == 'last' ]; then +if [ "${BUNDLE_URL}" == 'last' ]; then # 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" + if [[ "$KARAF_ARTIFACT" == "opendaylight" ]]; then + wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=opendaylight/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml" + elif [[ "$KARAF_ARTIFACT" == "karaf" ]]; then + wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml" + elif [[ "$KARAF_ARTIFACT" == "netconf-karaf" ]]; then + wget "http://${GERRIT_PATH}/gitweb?p=${KARAF_PROJECT}.git;a=blob_plain;f=karaf/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml" + elif [[ "$KARAF_ARTIFACT" == "controller-test-karaf" ]]; then + wget "http://${GERRIT_PATH}/gitweb?p=${KARAF_PROJECT}.git;a=blob_plain;f=karaf/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml" + else + wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml" + fi # Extract the BUNDLE_VERSION from the pom.xml BUNDLE_VERSION="$(xpath pom.xml '/project/version/text()' 2> /dev/null)" echo "Bundle version is ${BUNDLE_VERSION}" # Acquire the timestamp information from maven-metadata.xml - NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/integration/${KARAF_ARTIFACT}" + NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/${KARAF_PROJECT}/${KARAF_ARTIFACT}" wget "${NEXUSPATH}/${BUNDLE_VERSION}/maven-metadata.xml" less "maven-metadata.xml" TIMESTAMP="$(xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null)"