Since this week we have two sfc scenarios:
- os-odl-sfc
- os-odl-sfc_osm
When $DEPLOY_SCENARIO=os-odl-sfc, using the current code testing_role
gets two values:
os-odl-sfc
os-odl-sfc_osm
This patch adds '$' character to prevent matching scenarios which
concatenate characters after $DEPLOY_SCENARIO
Change-Id: Ia0782362da04e8b3ecd2ec6f13ccc8c404797fda
Signed-off-by: Manuel Buil <mbuil@suse.com>
set -eu
local playbooks_dir=(xci/playbooks xci/installer/osa/playbooks xci/installer/kubespray/playbooks)
# Extract role from scenario information
- local testing_role=$(sed -n "/^- scenario: ${DEPLOY_SCENARIO}/,/^$/p" ${XCI_PATH}/xci/opnfv-scenario-requirements.yml | grep role | rev | cut -d '/' -f -1 | rev)
+ local testing_role=$(sed -n "/^- scenario: ${DEPLOY_SCENARIO}$/,/^$/p" ${XCI_PATH}/xci/opnfv-scenario-requirements.yml | grep role | rev | cut -d '/' -f -1 | rev)
# clear XCI_CACHE
rm -rf ${XCI_CACHE}/repos/openstack-ansible-tests