From 351cef7b269f9f79c990ff39bc0205032a4d3465 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Fri, 26 Oct 2018 11:36:22 +0200 Subject: Bug fix: match only the scenario name 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 --- xci/files/xci-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xci/files/xci-lib.sh b/xci/files/xci-lib.sh index cb0751da..ba730772 100644 --- a/xci/files/xci-lib.sh +++ b/xci/files/xci-lib.sh @@ -199,7 +199,7 @@ ansible_lint() { 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 -- cgit 1.2.3-korg