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}"
15 CONTROLLERFEAT="${CONTROLLERFEATURES}"
18 NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
20 if [ ${BUNDLEURL} == 'last' ]; then
21 NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}"
22 # Extract the BUNDLEVERSION from the pom.xml
23 BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null`
24 echo "Bundle version is ${BUNDLEVERSION}"
25 # Acquire the timestamp information from maven-metadata.xml
26 wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml
27 less maven-metadata.xml
28 TIMESTAMP=`xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null`
29 echo "Nexus timestamp is ${TIMESTAMP}"
30 BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
31 BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip"
32 BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
34 BUNDLE="${BUNDLEURL##*/}"
35 BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))"
36 BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
39 echo "Distribution bundle URL is ${BUNDLEURL}"
40 echo "Distribution bundle is ${BUNDLE}"
41 echo "Distribution folder is ${BUNDLEFOLDER}"
44 # write the BUNDLE values into a HERE doc to later
47 cat > ${WORKSPACE}/bundle_vars.txt <<EOF
48 CONTROLLERFEAT=${CONTROLLERFEAT}
49 CONTROLLERMEM=${CONTROLLERMEM}
50 DISTRIBUTION=${DISTRIBUTION}
51 TIMESTAMP=${TIMESTAMP}
52 NEXUSURL_PREFIX=${NEXUSURL_PREFIX}
53 NEXUSPATH=${NEXUSPATH}
54 BUNDLEVERSION=${BUNDLEVERSION}
55 BUNDLEFOLDER=${BUNDLEFOLDER}
57 ACTUALBUNDLEURL=${BUNDLEURL}
61 echo "#################################################"
62 echo "## include-raw-integration-get-bundle_vars.txt ##"
63 echo "#################################################"