summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-08 12:42:00 +0800
committerliyuenan <liyuenan@huawei.com>2016-12-09 22:38:40 +0800
commit8563de45cd6dce04affcd9a52dacd76dad27ecae (patch)
treed69fdab2f7a156d73751def9ba1307040af6091d
parenta8699b19cc7207c776f6f7b2258bca5f1a90a879 (diff)
Fix manual ci trigger build
JIRA: COMPASS-509 Change-Id: I17bc50b855203af5c1fa9227dbb02e7ccbb87965 Signed-off-by: liyuenan <liyuenan@huawei.com>
-rwxr-xr-xci/deploy_ci.sh60
1 files changed, 44 insertions, 16 deletions
diff --git a/ci/deploy_ci.sh b/ci/deploy_ci.sh
index ecb28d00..b4e8541e 100755
--- a/ci/deploy_ci.sh
+++ b/ci/deploy_ci.sh
@@ -12,29 +12,51 @@
CI_DIR=$(cd $(dirname ${BASH_SOURCE:-$0});pwd)
-if [[ $ROOT_BUILD_CAUSE = MANUALTRIGGER ]]; then
- # For manual ci trigger buid, directly use the value pass from CI
- export COMPASS_OS_VERSION=${COMPASS_OS_VERSION:-trusty}
- export OPENSTACK_VERSION=${OPENSTACK_VERSION:-mitaka}
+if [[ $ROOT_BUILD_CAUSE == MANUALTRIGGER ]]; then
+ # For manual ci trigger build, directly use the value pass from CI
+ if [[ $COMPASS_OPENSTACK_VERSION == newton ]]; then
+ export COMPASS_OS_VERSION=xenial
+ export COMPASS_OPENSTACK_VERSION=newton_xenial
+ else
+ case $DEPLOY_SCENARIO in
+ os-odl_l2-moon-ha)
+ # os-odl_l2-moon-ha scenario supports xenial mitaka only
+ export COMPASS_OS_VERSION=xenial
+ export COMPASS_OPENSTACK_VERSION=mitaka_xenial
+ ;;
+ os-ocl-nofeature-ha)
+ # os-ocl-nofeature-ha scenario supports liberty only
+ export COMPASS_OS_VERSION=trusty
+ export COMPASS_OPENSTACK_VERSION=liberty
+ ;;
+ *)
+ # setup for testing mitaka by default
+ export COMPASS_OS_VERSION=${COMPASS_OS_VERSION:-trusty}
+ export COMPASS_OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION:-mitaka}
+ ;;
+ esac
+ fi
else
# For daily build or verify build, adjust COMPASS_OS_VERSION and OPENSTACK_VERSION
# value according to COMPASS_OS_VERSION and DEPLOY_SCENARIO pass from CI
- if [[ $COMPASS_OS_VERSION == centos ]]; then
+ if [[ $COMPASS_OS_VERSION == centos7 ]]; then
case $DEPLOY_SCENARIO in
os-odl_l2-moon-ha)
# os-odl_l2-moon-ha scenario supports xenial mitaka only
export COMPASS_OS_VERSION=xenial
- export OPENSTACK_VERSION=mitaka_xenial
+ export COMPASS_OPENSTACK_VERSION=mitaka_xenial
;;
os-ocl-nofeature-ha)
# os-ocl-nofeature-ha scenario supports liberty only
- export OPENSTACK_VERSION=liberty
+ export COMPASS_OS_VERSION=centos7
+ export COMPASS_OPENSTACK_VERSION=liberty
;;
*)
# setup for testing mitaka by default
- export OPENSTACK_VERSION=${OPENSTACK_VERSION:-mitaka}
+ export COMPASS_OS_VERSION=${COMPASS_OS_VERSION:-centos7}
+ export COMPASS_OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION:-mitaka}
;;
esac
@@ -43,36 +65,42 @@ else
os-nosdn-nofeature-ha)
# temporarily setup for testing newton
export COMPASS_OS_VERSION=xenial
- export OPENSTACK_VERSION=newton_xenial
+ export COMPASS_OPENSTACK_VERSION=newton_xenial
;;
os-odl_2-nofeature-ha)
# temporarily setup for testing newton
export COMPASS_OS_VERSION=xenial
- export OPENSTACK_VERSION=newton_xenial
+ export COMPASS_OPENSTACK_VERSION=newton_xenial
;;
os-odl_l2-moon-ha)
# os-odl_l2-moon-ha scenario supports xenial mitaka only
export COMPASS_OS_VERSION=xenial
- export OPENSTACK_VERSION=mitaka_xenial
+ export COMPASS_OPENSTACK_VERSION=mitaka_xenial
;;
os-ocl-nofeature-ha)
# os-ocl-nofeature-ha scenario supports liberty only
export COMPASS_OS_VERSION=trusty
- export OPENSTACK_VERSION=liberty
+ export COMPASS_OPENSTACK_VERSION=liberty
;;
*)
# setup for testing mitaka by default
export COMPASS_OS_VERSION=${COMPASS_OS_VERSION:-trusty}
- export OPENSTACK_VERSION=${OPENSTACK_VERSION:-mitaka}
+ export COMPASS_OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION:-mitaka}
;;
esac
fi
fi
-echo "########################################"
+# these variables used by compass
+export OS_VERSION=$COMPASS_OS_VERSION
+export OPENSTACK_VERSION=$COMPASS_OPENSTACK_VERSION
+
+set +x
+echo "#############################################"
echo 'DEPLOY_SCENARIO='$DEPLOY_SCENARIO
-echo 'COMPASS_OS_VERSION='$COMPASS_OS_VERSION
+echo 'OS_VERSION='$OS_VERSION
echo 'OPENSTACK_VERSION='$OPENSTACK_VERSION
-echo "########################################"
+echo "#############################################"
+set -x
$CI_DIR/../deploy.sh