X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fapex%2Fapex-deploy.sh;h=09d6ca6307ff92f419697cbbb7f0bdf0e74c5329;hb=668072f6a6f76381f7babc9950e99e935db1b6ed;hp=8f7af7ff9278feb9355ceee4a340b3359e27499f;hpb=a13a71e40f40d2bf75ab6faad240cfdf3d3a57c9;p=releng.git diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 8f7af7ff9..09d6ca630 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -13,7 +13,7 @@ echo "Starting the Apex deployment." echo "--------------------------------------------------------" echo -if [ -z "$DEPLOY_SCENARIO" ]; then +if [ -z ${DEPLOY_SCENARIO+x} ]; then echo "Deploy scenario not set!" exit 1 else @@ -151,6 +151,25 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then else ENV_TYPE="functest" fi + if [ -z ${OS_VERSION+x} ]; then + echo "INFO: OS_VERSION not passed to deploy, detecting based on branch and scenario" + case $BRANCH in + master) + if [[ "$DEPLOY_SCENARIO" =~ "rocky" ]]; then + OS_VERSION=rocky + else + OS_VERSION=master + fi + ;; + *gambia) + OS_VERSION=queens + ;; + *) + echo "Unable to detection OS_VERSION, aborting" + exit 1 + ;; + esac + fi if [[ "$OS_VERSION" != "master" ]]; then SNAP_ENV="${ENV_TYPE}-${OS_VERSION}-environment.yaml" else