1 echo "#################################################"
2 echo "## include-raw-integration-get-bundle_vars.txt ##"
3 echo "#################################################"
5 # Create a script to run controller inside a dynamic jenkins slave
11 if [ ${CONTROLLERSCOPE} == 'all' ]; then
12 CONTROLLERFEAT="odl-integration-compatible-with-all,${CONTROLLERFEATURES}"
16 NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
18 if [ ${BUNDLEURL} == 'last' ]; then
19 NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}"
20 # Extract the BUNDLEVERSION from the pom.xml
21 BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null`
22 echo "Bundle version is ${BUNDLEVERSION}"
23 # Acquire the timestamp information from maven-metadata.xml
24 wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml
25 less maven-metadata.xml
26 TIMESTAMP=`xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null`
27 echo "Nexus timestamp is ${TIMESTAMP}"
28 BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
29 BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip"
30 BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
32 BUNDLE="${BUNDLEURL##*/}"
33 BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))"
34 BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
37 echo "Distribution bundle URL is ${BUNDLEURL}"
38 echo "Distribution bundle is ${BUNDLE}"
39 echo "Distribution folder is ${BUNDLEFOLDER}"
42 # write the BUNDLE values into a HERE doc to later
45 cat > ${WORKSPACE}/bundle_vars.txt <<EOF
46 CONTROLLERFEAT=${CONTROLLERFEAT}
47 CONTROLLERMEM=${CONTROLLERMEM}
48 DISTRIBUTION=${DISTRIBUTION}
49 TIMESTAMP=${TIMESTAMP}
50 NEXUSURL_PREFIX=${NEXUSURL_PREFIX}
51 NEXUSPATH=${NEXUSPATH}
52 BUNDLEVERSION=${BUNDLEVERSION}
53 BUNDLEFOLDER=${BUNDLEFOLDER}
55 ACTUALBUNDLEURL=${BUNDLEURL}
59 echo "#################################################"
60 echo "## include-raw-integration-get-bundle_vars.txt ##"
61 echo "#################################################"