Basic CI integration for building Gluon packages
[releng.git] / jjb / compass4nfv / compass-deploy.sh
index 0231ea5..2567179 100644 (file)
@@ -25,8 +25,23 @@ echo 1 > /proc/sys/vm/drop_caches
 export CONFDIR=$WORKSPACE/deploy/conf
 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
 
+cd $WORKSPACE
+
+export OS_VERSION=${COMPASS_OS_VERSION}
+export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
+if [[ "${COMPASS_OS_VERSION_OPTION}" = "xenial" ]] && [[ "${OPENSTACK_VERSION}" = "mitaka" ]]; then
+    export OPENSTACK_VERSION=${OPENSTACK_VERSION}_${COMPASS_OS_VERSION_OPTION}
+    export OS_VERSION=${COMPASS_OS_VERSION_OPTION}
+fi
+if [[ "${OPENSTACK_VERSION}" = "newton" ]]; then
+    export OS_VERSION="xenial"
+    export OPENSTACK_VERSION=${OPENSTACK_VERSION}_${OS_VERSION}
+fi
+
+
 if [[ "${DEPLOY_SCENARIO}" =~ "-ocl" ]]; then
     export NETWORK_CONF_FILE=network_ocl.yml
+    export OPENSTACK_VERSION=liberty
 elif [[ "${DEPLOY_SCENARIO}" =~ "-onos" ]]; then
     export NETWORK_CONF_FILE=network_onos.yml
 else
@@ -42,13 +57,6 @@ else
     export DHA_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${DEPLOY_SCENARIO}.yml
 fi
 
-cd $WORKSPACE
-
-export OS_VERSION=${COMPASS_OS_VERSION}
-export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
-if [[ "${COMPASS_OS_VERSION_OPTION}" = "xenial" ]] && [[ "${OPENSTACK_VERSION}" = "mitaka" ]]; then
-    export OPENSTACK_VERSION=${OPENSTACK_VERSION}_${COMPASS_OS_VERSION_OPTION}
-fi
 ./deploy.sh --dha ${DHA_CONF} --network ${NETWORK_CONF}
 if [ $? -ne 0 ]; then
     echo "depolyment failed!"
@@ -60,6 +68,6 @@ echo "--------------------------------------------------------"
 echo "Done!"
 
 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
-sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./  &> /dev/null
+sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${OPENSTACK_VERSION}-opnfv2/ansible.log ./  &> /dev/null
 
 exit $deploy_ret