Merge "Configure integration scripts to use Nexus proxy"
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 1 Apr 2015 14:12:09 +0000 (14:12 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 1 Apr 2015 14:12:10 +0000 (14:12 +0000)
1  2 
jjb/integration/include-raw-integration-deploy-controller-offline.sh
jjb/integration/include-raw-integration-deploy-controller-run-test.sh

index 283ef64541e417f3ffe2af3250d5a659a21d86b6,a6dcfda89bbf5bc51ec340475aaa52a9374f450f..0848d0376c500d473f659b1b215d4c9a5a3f2313
@@@ -3,8 -3,10 +3,10 @@@ DISTRIBUTION="karaf
  CONTROLLERFEATURES="odl-integration-compatible-with-all"
  CONTROLLERMEM="3072m"
  
+ NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
  if [ ${BUNDLEURL} == 'last' ]; then
-     NEXUSPATH="https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}"
+     NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}"
      # Extract the BUNDLEVERSION from the pom.xml
      BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null`
      echo "Bundle version is ${BUNDLEVERSION}"
      BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip"
      BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
  else
 -    BUNDLE="$(echo ${BUNDLEURL} | awk -F '/' '{ print $(NF) }')"
 -    echo "Finding out Bundle folder..."
 -    wget --no-verbose  ${BUNDLEURL}
 -    BUNDLEFOLDER="$(unzip -qql ${BUNDLE} | head -n1 | tr -s ' ' | cut -d' ' -f5- | rev | cut -c 2- | rev)"
 -    rm ${BUNDLE}
 +    BUNDLE="${BUNDLEURL##*/}"
 +    BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))"
 +    BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
  fi
  
  echo "Distribution bundle URL is ${BUNDLEURL}"
  echo "Distribution bundle is ${BUNDLE}"
  echo "Distribution folder is ${BUNDLEFOLDER}"
  
 -echo "Downloading the distribution from ${BUNDLEURL}"
 +echo "Downloading the distribution..."
  wget --no-verbose  ${BUNDLEURL}
  
  echo "Extracting the new controller..."
index 773f58241e70eb8a3a25dcfba10dbddb9068b645,053fe9a04083a110cd7fe11ba702393cbbe0a742..1be01ad35daa6aa532b2b55b3a0602a5db4edf86
@@@ -7,8 -7,10 +7,10 @@@ if [ ${CONTROLLERSCOPE} == 'all' ]; the
      CONTROLLERMEM="3072m"
  fi
  
+ NEXUSURL_PREFIX=${ODLNEXUSPROXY:-https://nexus.opendaylight.org}
  if [ ${BUNDLEURL} == 'last' ]; then
-     NEXUSPATH="https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}"
+     NEXUSPATH="${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-${DISTRIBUTION}"
      # Extract the BUNDLEVERSION from the pom.xml
      BUNDLEVERSION=`xpath pom.xml '/project/version/text()' 2> /dev/null`
      echo "Bundle version is ${BUNDLEVERSION}"
      BUNDLE="distribution-${DISTRIBUTION}-${TIMESTAMP}.zip"
      BUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
  else
 -    BUNDLE="$(echo ${BUNDLEURL} | awk -F '/' '{ print $(NF) }')"
 -    echo "Finding out Bundle folder..."
 -    wget --no-verbose  ${BUNDLEURL}
 -    BUNDLEFOLDER="$(unzip -qql ${BUNDLE} | head -n1 | tr -s ' ' | cut -d' ' -f5- | rev | cut -c 2- | rev)"
 -    rm ${BUNDLE}
 +    BUNDLE="${BUNDLEURL##*/}"
 +    BUNDLEVERSION="$(basename $(dirname $BUNDLEURL))"
 +    BUNDLEFOLDER="distribution-${DISTRIBUTION}-${BUNDLEVERSION}"
  fi
  
  echo "Distribution bundle URL is ${BUNDLEURL}"
@@@ -30,9 -34,9 +32,9 @@@ echo "Distribution bundle is ${BUNDLE}
  echo "Distribution folder is ${BUNDLEFOLDER}"
  
  cat > ${WORKSPACE}/controller-script.sh <<EOF
 -echo "Downloading the distribution from ${BUNDLEURL}"
 +echo "Downloading the distribution..."
  cd /tmp
 -wget --no-verbose  ${BUNDLEURL}
 +wget --no-verbose '${BUNDLEURL}'
  
  echo "Extracting the new controller..."
  unzip -q ${BUNDLE}