From: Fatih Degirmenci Date: Thu, 1 Mar 2018 13:47:22 +0000 (+0000) Subject: xci: Fix scenario name extraction X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=commitdiff_plain;h=a81d666d1b9fe7afdc607caf7677e1e0082c9327 xci: Fix scenario name extraction Change-Id: Ifcea3d364b73d0d19d46aaf2bd2210ec6440f383 Signed-off-by: Fatih Degirmenci --- diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh index 59205e291..764857ba4 100755 --- a/jjb/xci/xci-set-scenario.sh +++ b/jjb/xci/xci-set-scenario.sh @@ -58,7 +58,7 @@ fi git clone https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $WORK_DIRECTORY/$GERRIT_PROJECT cd $WORK_DIRECTORY/$GERRIT_PROJECT git fetch https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $GERRIT_REFSPEC && git checkout FETCH_HEAD -DEPLOY_SCENARIO=$(git diff HEAD^..HEAD --name-only | grep scenarios | sed -r 's/scenarios\/(.*?)\/.*/\1/' | uniq) +DEPLOY_SCENARIO=$(git diff HEAD^..HEAD --name-only | grep scenarios | awk -F '[/|/]' '{print $2}' | uniq) # ensure single scenario is impacted if [[ $(echo $DEPLOY_SCENARIO | wc -w) != 1 ]]; then