From: Markos Chandras Date: Thu, 12 Apr 2018 07:35:15 +0000 (+0100) Subject: jjb: xci: xci-set-scenario.sh: Fix conditional for default scenario X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=8299421a82f682a351f9fb1be8b988dc07161317;p=releng.git jjb: xci: xci-set-scenario.sh: Fix conditional for default scenario We only set default scenario if there is not one set already so we need to check if the array is empty. Change-Id: Ic5019fb68349adaf52d669aed43574bc5eaeddc3 Signed-off-by: Markos Chandras --- diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh index 8ef525496..c28093d27 100755 --- a/jjb/xci/xci-set-scenario.sh +++ b/jjb/xci/xci-set-scenario.sh @@ -114,7 +114,7 @@ function determine_generic_scenario() { done # For all other changes, we only need to set a default scenario if it's not set already if git diff HEAD^..HEAD --name-only | grep -q -v 'xci/installer\|xci/scenario'; then - [[ ${#DEPLOY_SCENARIO[@]} -gt 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature' + [[ ${#DEPLOY_SCENARIO[@]} -eq 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature' fi # extract releng-xci sha