Move netvirt Sonar scan to Sonarcloud
[releng/builder.git] / jjb / integration / common-functions.sh
index b68bdc0d7b3fa2075c6405aa7b0ab9d19b6f7a24..01409f2c5246cb8421fe196b25755395e02ebad5 100644 (file)
@@ -10,7 +10,7 @@ export FEATURESCONF=/tmp/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg
 export CUSTOMPROP=/tmp/${BUNDLEFOLDER}/etc/custom.properties
 export LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg
 export MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv
-export CONTROLLERMEM="2048m"
+export CONTROLLERMEM=${CONTROLLERMAXMEM}
 
 # Cluster specific configuration settings
 export AKKACONF=/tmp/${BUNDLEFOLDER}/configuration/initial/akka.conf
@@ -83,10 +83,8 @@ function configure_karaf_log() {
     echo "Configuring the karaf log... karaf_version: ${karaf_version}, logapi: ${logapi}"
     if [ "${logapi}" == "log4j2" ]; then
         # FIXME: Make log size limit configurable from build parameter.
-        # From Neon the default karaf file size is 64 MB
+        # Increase default log file size to 1GB
         sed -ie 's/log4j2.appender.rolling.policies.size.size = 64MB/log4j2.appender.rolling.policies.size.size = 1GB/g' "${LOGCONF}"
-        # Flourine still uses 16 MB
-        sed -ie 's/log4j2.appender.rolling.policies.size.size = 16MB/log4j2.appender.rolling.policies.size.size = 1GB/g' "${LOGCONF}"
         orgmodule="org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver"
         orgmodule_="${orgmodule//./_}"
         echo "${logapi}.logger.${orgmodule_}.name = WARN" >> "${LOGCONF}"
@@ -464,6 +462,7 @@ DISTROSTREAM: ${DISTROSTREAM}
 BUNDLE_URL: ${BUNDLE_URL}
 CONTROLLERFEATURES: ${CONTROLLERFEATURES}
 CONTROLLERDEBUGMAP: ${CONTROLLERDEBUGMAP}
+CONTROLLERMAXMEM: ${CONTROLLERMAXMEM}
 SCRIPTPLAN: ${SCRIPTPLAN}
 CONFIGPLAN: ${CONFIGPLAN}
 STREAMTESTPLAN: ${STREAMTESTPLAN}
@@ -857,7 +856,12 @@ function get_nodes_list() {
 function get_features() {
     if [ "${CONTROLLERSCOPE}" == 'all' ]; then
         ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}"
-        export CONTROLLERMEM="3072m"
+        # if CONTROLLERMEM still is the default 2G and was not overridden by a
+        # custom job, then we need to make sure to increase it because "all"
+        # features can be heavy
+        if [ "${CONTROLLERMEM}" == "2048m" ]; then
+            export CONTROLLERMEM="3072m"
+        fi
     else
         ACTUALFEATURES="odl-infrautils-ready,${CONTROLLERFEATURES}"
     fi