From: Tim Rozet Date: Mon, 19 Nov 2018 18:36:42 +0000 (+0000) Subject: Merge "Apex: Fix OS_VERSION detection" X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=ba6c7504201c56df6f2052cdb73c800b303447a8;hp=9261f361c1ce51a8425f928895d7379fd42754c4;p=releng.git Merge "Apex: Fix OS_VERSION detection" --- diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 8f7af7ff9..0e247df6c 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -151,6 +151,25 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then else ENV_TYPE="functest" fi + if [ -z "$OS_VERSION" ]; 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