Merge "Added the Hbase Client installation on Controller VM"
[releng/builder.git] / jjb / integration / include-raw-integration-get-bundle-vars.sh
1 echo "#################################################"
2 echo "## include-raw-integration-get-bundle_vars.txt ##"
3 echo "#################################################"
4 set -x
5 # Create a script to run controller inside a dynamic jenkins slave
6 CONTROLLERMEM="2048m"
7 DISTRIBUTION="karaf"
8
9
10
11 if [ ${CONTROLLERSCOPE} == 'all' ]; then
12     CONTROLLERFEAT="odl-integration-compatible-with-all,${CONTROLLERFEATURES}"
13     CONTROLLERMEM="3072m"
14 fi
15
16 NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
17
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}"
31 else
32     BUNDLE="${BUNDLEURL##*/}"
33     BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))"
34     BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
35 fi
36
37 echo "Distribution bundle URL is ${BUNDLEURL}"
38 echo "Distribution bundle is ${BUNDLE}"
39 echo "Distribution folder is ${BUNDLEFOLDER}"
40
41
42 # write the BUNDLE values into a HERE doc to later
43 #  export to jenkins
44
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}
54 BUNDLE=${BUNDLE}
55 ACTUALBUNDLEURL=${BUNDLEURL}
56 EOF
57 set +x
58 ls
59 echo "#################################################"
60 echo "## include-raw-integration-get-bundle_vars.txt ##"
61 echo "#################################################"
62
63