X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-detect-variables.sh;h=961df7bcbbe0aef28812847bec6d446a3224af07;hb=93a5304ef04620630cbd6de14694607048bf2aa3;hp=009e0fe4b45304a406a4614e27b4067bd5cab0e0;hpb=866315a15e48aa263e85bebefd549dd0bbd1328e;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-detect-variables.sh b/jjb/integration/integration-detect-variables.sh index 009e0fe4b..961df7bcb 100644 --- a/jjb/integration/integration-detect-variables.sh +++ b/jjb/integration/integration-detect-variables.sh @@ -7,34 +7,34 @@ DISTROBRANCH="${DISTROBRANCH:-$GERRIT_BRANCH}" 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" - # Extract the BUNDLEVERSION from the pom.xml - BUNDLEVERSION="$(xpath pom.xml '/project/version/text()' 2> /dev/null)" - echo "Bundle version is ${BUNDLEVERSION}" + 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" + 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}" - wget "${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml" + 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)" echo "Nexus timestamp is ${TIMESTAMP}" - BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLEVERSION}" + BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLE_VERSION}" BUNDLE="${KARAF_ARTIFACT}-${TIMESTAMP}.zip" - ACTUAL_BUNDLE_URL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}" -elif [[ "${BUNDLE_URL}" == *"distribution-check"* ]]; then - ACTUAL_BUNDLE_URL="${BUNDLE_URL}" - BUNDLE="${BUNDLE_URL##*/}" - BUNDLEFOLDER="${BUNDLE//.zip}" - BUNDLEVERSION="${BUNDLEFOLDER//$KARAF_ARTIFACT-}" + ACTUAL_BUNDLE_URL="${NEXUSPATH}/${BUNDLE_VERSION}/${BUNDLE}" else ACTUAL_BUNDLE_URL="${BUNDLE_URL}" BUNDLE="${BUNDLE_URL##*/}" - BUNDLEVERSION="$(basename "$(dirname "${BUNDLE_URL}")")" - BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLEVERSION}" + ARTIFACT="$(basename "$(dirname "$(dirname "${BUNDLE_URL}")")")" + BUNDLE_VERSION="$(basename "$(dirname "${BUNDLE_URL}")")" + BUNDLEFOLDER="${ARTIFACT}-${BUNDLE_VERSION}" fi echo "Distribution bundle URL is ${ACTUAL_BUNDLE_URL}" echo "Distribution bundle is ${BUNDLE}" -echo "Distribution bundle version is ${BUNDLEVERSION}" +echo "Distribution bundle version is ${BUNDLE_VERSION}" echo "Distribution folder is ${BUNDLEFOLDER}" echo "Nexus prefix is ${NEXUSURL_PREFIX}" @@ -42,7 +42,7 @@ echo "Nexus prefix is ${NEXUSURL_PREFIX}" cat > "${WORKSPACE}/detect_variables.env" <