diff options
author | Markos Chandras <mchandras@suse.de> | 2018-04-06 14:02:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-04-06 14:02:31 +0000 |
commit | aa362e7b865f463cce253cd321d68aced919c2b6 (patch) | |
tree | 1c4afc943c1e51f100606788cf4ce9bea81a5b40 | |
parent | 2913820a65ed1201c616c188a1af99eb53a9994c (diff) | |
parent | b2a1fdfe53c03b730544d714da1547cb29b25ae2 (diff) |
Merge "jjb: xci: xci-set-scenario: Allow automatic detection of generic scenarios"
-rwxr-xr-x | jjb/xci/xci-set-scenario.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh index c3012cd88..3e64ab140 100755 --- a/jjb/xci/xci-set-scenario.sh +++ b/jjb/xci/xci-set-scenario.sh @@ -96,22 +96,22 @@ function determine_generic_scenario() { # get the changeset cd $WORKSPACE - CHANGESET=$(git diff HEAD^..HEAD --name-only) - for CHANGED_FILE in $CHANGESET; do + SCENARIOS=$(git diff HEAD^..HEAD --name-only -- 'xci/scenarios' | cut -d "/" -f 3 | uniq) + # We need to set default scenario for changes that do not mess with scenarios + NO_SCENARIOS=$(git diff HEAD^..HEAD --name-only | grep -v 'xci/scenarios' | cut -d "/" -f 3 | uniq) + for CHANGED_SCENARIO in $SCENARIOS; do + [[ ${DEPLOY_SCENARIO[@]} =~ $CHANGED_SCENARIO ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]=$CHANGED_SCENARIO + done + for CHANGED_FILE in $NO_SCENARIOS; do case $CHANGED_FILE in - *k8-nosdn*|*kubespray*) + kubespray) [[ ${DEPLOY_SCENARIO[@]} =~ "k8-nosdn-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='k8-nosdn-nofeature' ;; - *os-odl*) - [[ ${DEPLOY_SCENARIO[@]} =~ "os-odl-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-odl-nofeature' - ;; - *os-nosdn*|*osa*) - [[ ${DEPLOY_SCENARIO[@]} =~ "os-nosdn-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature' - ;; + # Default case (including OSA changes) *) [[ ${DEPLOY_SCENARIO[@]} =~ "os-nosdn-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature' ;; - esac + esac done # extract releng-xci sha |