stream: global
prefix: '' # A prefix for job names sandbox for example: user-
+ scriptplan: '{project}.txt'
+ configplan: '{project}.txt'
testplan: '{project}-{functionality}.txt'
streamtestplan: '{project}-{functionality}-{stream}.txt'
karaf-version: karaf4
cat ${LOGCONF}
} # function configure_karaf_log()
+function run_plan() {
+ local -r type=$1
+
+ case ${type} in
+ script)
+ plan=$SCRIPTPLAN
+ ;;
+ config|*)
+ plan=$CONFIGPLAN
+ ;;
+ esac
+
+ printf "Locating ${type} plan to use...\n"
+ plan_filepath="${WORKSPACE}/test/csit/${type}plans/$plan"
+ if [ ! -f "${plan_filepath}" ]; then
+ plan_filepath="${WORKSPACE}/test/csit/${type}plans/${STREAMTESTPLAN}"
+ if [ ! -f "${plan_filepath}" ]; then
+ plan_filepath="${WORKSPACE}/test/csit/${type}plans/${TESTPLAN}"
+ fi
+ fi
+
+ if [ -f "${plan_filepath}" ]; then
+ printf "${type} plan exists!!!\n"
+ printf "Changing the ${type} plan path...\n"
+ cat ${plan_filepath} | sed "s:integration:${WORKSPACE}:" > ${type}plan.txt
+ cat ${type}plan.txt
+ for line in $( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' ${type}plan.txt ); do
+ printf "Executing ${line}...\n"
+ # shellcheck source=${line} disable=SC1091
+ source ${line}
+ done
+ fi
+ printf "Finished running ${type} plans\n"
+} # function run_plan()
+
# convert commas in csv strings to spaces (ssv)
function csv2ssv() {
local csv=$1
echo ${nodes_list}
+run_plan "script"
+
# Run script plan in case it exists
if [ -f ${WORKSPACE}/test/csit/scriptplans/${TESTPLAN} ]; then
echo "scriptplan exists!!!"
ssh ${!CONTROLLERIP} "bash /tmp/configuration-script.sh ${i}"
done
-# Run config plan in case it exists
-configplan_filepath="${WORKSPACE}/test/csit/configplans/${STREAMTESTPLAN}"
-if [ ! -f "${configplan_filepath}" ]; then
- configplan_filepath="${WORKSPACE}/test/csit/configplans/${TESTPLAN}"
-fi
-
-if [ -f ${configplan_filepath} ]; then
- echo "configplan exists!!!"
- echo "Reading the configplan:"
- cat ${configplan_filepath} | sed "s:integration:${WORKSPACE}:" > configplan.txt
- cat configplan.txt
- for line in $( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' configplan.txt ); do
- echo "Executing ${line}..."
- source ${line}
- done
-fi
+run_plan "config"
# Copy over the startup script to each controller and execute it.
for i in `seq 1 ${NUM_ODL_SYSTEM}`
SPACE_SEPARATED_FEATURES=$(echo "${ACTUALFEATURES}" | tr ',' ' ')
echo "SPACE_SEPARATED_FEATURES: ${SPACE_SEPARATED_FEATURES}"
-if [ -f "${WORKSPACE}/test/csit/scriptplans/${TESTPLAN}" ]; then
- echo "scriptplan exists!!!"
- echo "Changing the scriptplan path..."
- cat ${WORKSPACE}/test/csit/scriptplans/${TESTPLAN} | sed "s:integration:${WORKSPACE}:" > scriptplan.txt
- cat scriptplan.txt
- for line in $( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' scriptplan.txt ); do
- echo "Executing ${line}..."
- # shellcheck source=${line} disable=SC1091
- source ${line}
- done
-fi
+run_plan "script"
cat > ${WORKSPACE}/configuration-script.sh <<EOF
set -x
done
done
-echo "Locating config plan to use..."
-configplan_filepath="${WORKSPACE}/test/csit/configplans/${STREAMTESTPLAN}"
-if [ ! -f "${configplan_filepath}" ]; then
- configplan_filepath="${WORKSPACE}/test/csit/configplans/${TESTPLAN}"
-fi
-
-if [ -f "${configplan_filepath}" ]; then
- echo "configplan exists!!!"
- echo "Changing the configplan path..."
- cat ${configplan_filepath} | sed "s:integration:${WORKSPACE}:" > configplan.txt
- cat configplan.txt
- for line in $( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' configplan.txt ); do
- echo "Executing ${line}..."
- # shellcheck source=${line} disable=SC1091
- source ${line}
- done
-fi
+run_plan "config"
# Copy over the startup script to controller and execute it.
for i in `seq 1 ${NUM_ODL_SYSTEM}`
BUNDLE_URL: ${BUNDLE_URL}
CONTROLLERFEATURES: ${CONTROLLERFEATURES}
CONTROLLERDEBUGMAP: ${CONTROLLERDEBUGMAP}
+SCRIPTPLAN: ${SCRIPTPLAN}
+CONFIGPLAN: ${CONFIGPLAN}
+STREAMTESTPLAN: ${STREAMTESTPLAN}
TESTPLAN: ${TESTPLAN}
SUITES: ${SUITES}
PATCHREFSPEC: ${PATCHREFSPEC}
default: '{stream}'
description: 'Distribution stream string, for suites to know which behavior to expect'
+- parameter:
+ name: integration-script-plan
+ parameters:
+ - string:
+ name: SCRIPTPLAN
+ default: '{script-plan}'
+ description: 'Script plan we will run before downloading and un-archiving am ODL distribution'
+
+- parameter:
+ name: integration-config-plan
+ parameters:
+ - string:
+ name: CONFIGPLAN
+ default: '{config-plan}'
+ description: 'Config plan we will run after un-archiving and starting an ODL distribution'
+
- parameter:
name: integration-stream-test-plan
parameters:
controller-debug-map: '{debug-map}'
- integration-test-options:
test-options: '{robot-options}'
+ - integration-script-plan:
+ script-plan: '{scriptplan}'
+ - integration-config-plan:
+ config-plan: '{configplan}'
- integration-test-plan:
test-plan: '{testplan}'
- integration-test-suites:
controller-debug-map: '{debug-map}'
- integration-test-options:
test-options: '{robot-options}'
+ - integration-script-plan:
+ script-plan: '{scriptplan}'
+ - integration-config-plan:
+ config-plan: '{configplan}'
- integration-test-plan:
test-plan: '{testplan}'
- integration-test-suites: