Move global variables to parent script 07/64507/1
authorLuis Gomez <ecelgp@gmail.com>
Thu, 19 Oct 2017 06:58:04 +0000 (23:58 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Thu, 19 Oct 2017 06:58:04 +0000 (23:58 -0700)
This way they can be use by any children script.

Change-Id: Ie9cf36df477f638c08be40fbde0a28cdf7755fd5
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
jjb/integration/integration-configure-clustering.sh
jjb/integration/integration-deploy-controller-run-test.sh

index f986a1d3d104b455e15d979dadebb6d5c27f0553..b8b50926c1a9fb4827a317d33e836c4ea8a6e253 100644 (file)
@@ -12,8 +12,13 @@ echo "#################################################"
 AKKACONF=/tmp/${BUNDLEFOLDER}/configuration/initial/akka.conf
 MODULESCONF=/tmp/${BUNDLEFOLDER}/configuration/initial/modules.conf
 MODULESHARDSCONF=/tmp/${BUNDLEFOLDER}/configuration/initial/module-shards.conf
+FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg
+CUSTOMPROP=/tmp/${BUNDLEFOLDER}/etc/custom.properties
+LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg
+MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv
 CONTROLLERMEM="2048m"
 
+
 if [ ${CONTROLLERSCOPE} == 'all' ]; then
     ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}"
     CONTROLLERMEM="3072m"
@@ -71,30 +76,26 @@ echo "Extracting the new controller..."
 unzip -q ${BUNDLE}
 
 echo "Configuring the startup features..."
-FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg
-CUSTOMPROP=/tmp/${BUNDLEFOLDER}/etc/custom.properties
-sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" \${FEATURESCONF}
-sed -ie "s%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/features-integration-test/${BUNDLEVERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features%g" \${FEATURESCONF}
-cat \${FEATURESCONF}
+sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" ${FEATURESCONF}
+sed -ie "s%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/features-integration-test/${BUNDLEVERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features%g" ${FEATURESCONF}
+cat ${FEATURESCONF}
 
 echo "Configuring the log..."
-LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg
-sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupIndex=1/g' \${LOGCONF}
+sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupIndex=1/g' ${LOGCONF}
 # FIXME: Make log size limit configurable from build parameter.
-sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=30GB/g' \${LOGCONF}
-cat \${LOGCONF}
+sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=30GB/g' ${LOGCONF}
+cat ${LOGCONF}
 
 if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then
   echo "Enable the l3.fwd in custom.properties.."
-  echo "ovsdb.l3.fwd.enabled=yes" >> \${CUSTOMPROP}
-  cat \${CUSTOMPROP}
+  echo "ovsdb.l3.fwd.enabled=yes" >> ${CUSTOMPROP}
+  cat ${CUSTOMPROP}
 fi
 
 echo "Configure java home and max memory..."
-MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv
-sed -ie 's%^# export JAVA_HOME%export JAVA_HOME="\${JAVA_HOME:-${JAVA_HOME}}"%g' \${MEMCONF}
-sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' \${MEMCONF}
-cat \${MEMCONF}
+sed -ie 's%^# export JAVA_HOME%export JAVA_HOME="\${JAVA_HOME:-${JAVA_HOME}}"%g' ${MEMCONF}
+sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' ${MEMCONF}
+cat ${MEMCONF}
 
 echo "Set Java version"
 sudo /usr/sbin/alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 1
index ecba48eec1066707a5bd4a4051d63d6d1dcd4702..b8eaf06ddb0d09582e85c656ddbb012c636b0424 100644 (file)
@@ -5,6 +5,10 @@
 # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091
 source ${ROBOT_VENV}/bin/activate
 
+FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg
+CUSTOMPROP=/tmp/${BUNDLEFOLDER}/etc/custom.properties
+LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg
+MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv
 CONTROLLERMEM="2048m"
 
 if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then
@@ -51,9 +55,7 @@ echo "Extracting the new controller..."
 unzip -q ${BUNDLE}
 
 echo "Configuring the startup features..."
-FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg
-CUSTOMPROP=/tmp/${BUNDLEFOLDER}/etc/custom.properties
-sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" \${FEATURESCONF}
+sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" ${FEATURESCONF}
 
 FEATURE_INDEX_STRING="features-integration-index"
 FEATURE_TEST_STRING="features-integration-test"
@@ -62,21 +64,20 @@ if [[ "$KARAF_VERSION" == "karaf4" ]]; then
     FEATURE_TEST_STRING="features-test"
 fi
 
-sed -ie "s%mvn:org.opendaylight.integration/\${FEATURE_INDEX_STRING}/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/\${FEATURE_INDEX_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features%g" \${FEATURESCONF}
-cat \${FEATURESCONF}
+sed -ie "s%mvn:org.opendaylight.integration/\${FEATURE_INDEX_STRING}/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/\${FEATURE_INDEX_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features%g" ${FEATURESCONF}
+cat ${FEATURESCONF}
 
 if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then
     echo "Enable the l3.fwd in custom.properties..."
-    echo "ovsdb.l3.fwd.enabled=yes" >> \${CUSTOMPROP}
+    echo "ovsdb.l3.fwd.enabled=yes" >> ${CUSTOMPROP}
 fi
-cat \${CUSTOMPROP}
+cat ${CUSTOMPROP}
 
 echo "Configuring the log..."
-LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg
-sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupIndex=1/g' \${LOGCONF}
+sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupIndex=1/g' ${LOGCONF}
 # FIXME: Make log size limit configurable from build parameter.
-sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=30GB/g' \${LOGCONF}
-echo "log4j.logger.org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver = WARN" >> \${LOGCONF}
+sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=30GB/g' ${LOGCONF}
+echo "log4j.logger.org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver = WARN" >> ${LOGCONF}
 # Add custom logging levels
 # CONTROLLERDEBUGMAP is expected to be a key:value map of space separated values like "module:level module2:level2"
 # where module is abbreviated and does not include org.opendaylight
@@ -86,17 +87,16 @@ if [ -n "${CONTROLLERDEBUGMAP}" ]; then
         module=\${kv%%:*}
         level=\${kv#*:}
         if [ -n \${module} ] && [ -n \${level} ]; then
-            echo "log4j.logger.org.opendaylight.\${module} = \${level}" >> \${LOGCONF}
+            echo "log4j.logger.org.opendaylight.\${module} = \${level}" >> ${LOGCONF}
         fi
     done
 fi
-cat \${LOGCONF}
+cat ${LOGCONF}
 
 echo "Configure java home and max memory..."
-MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv
-sed -ie 's%^# export JAVA_HOME%export JAVA_HOME="\${JAVA_HOME:-${JAVA_HOME}}"%g' \${MEMCONF}
-sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' \${MEMCONF}
-cat \${MEMCONF}
+sed -ie 's%^# export JAVA_HOME%export JAVA_HOME="\${JAVA_HOME:-${JAVA_HOME}}"%g' ${MEMCONF}
+sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' ${MEMCONF}
+cat ${MEMCONF}
 
 echo "Listing all open ports on controller system..."
 netstat -pnatu