engine: Create openstack release jobs
[infra/cicd.git] / jjb / cloud-infra / onap-deploy.sh
old mode 100755 (executable)
new mode 100644 (file)
index 284a101..f2faad5
@@ -22,6 +22,7 @@ set -o errexit
 set -o nounset
 
 cd $WORKSPACE
+/bin/rm -f ../inventory.ini
 echo "Info: Preparing for ONAP deployment"
 
 # checkout given engine version
@@ -32,8 +33,10 @@ fi
 
 # checkout given engine refspec
 if [[ "$ENGINE_REFSPEC" != "master" ]]; then
-  echo "Warning: Checking out $ENGINE_REFSPEC"
-  git fetch -q https://gerrit.nordix.org/infra/engine $ENGINE_REFSPEC && git checkout -q FETCH_HEAD
+  echo "Warning: Checking out engine $ENGINE_REFSPEC"
+  echo "-------------------------------------------------------------------------"
+  git fetch https://gerrit.nordix.org/infra/engine $ENGINE_REFSPEC && git checkout -q FETCH_HEAD
+  echo "-------------------------------------------------------------------------"
 fi
 
 # update scenario version and refspec in engine/envine/var/sdf.yml
@@ -54,12 +57,19 @@ scenario:
         distros:
           - $DISTRO
 EOF
+
+  echo "Info: Temporary SDF content"
+  echo "-------------------------------------------------------------------------"
+  cat $WORKSPACE/engine/var/sdf.yml
+  echo "-------------------------------------------------------------------------"
 fi
 
 echo "Info: Starting K8S cluster creation and ONAP deployment"
 echo "-------------------------------------------------------------------------"
 cd $WORKSPACE
-./deploy.sh -c -r $PROVISIONER_TYPE -u $OPENRC_FILE \
+./engine/deploy.sh -r $PROVISIONER_TYPE -u /tmp/openrc \
   -s $DEPLOY_SCENARIO -e $HEAT_ENVIRONMENT_FILE
 
+cd $WORKSPACE
+/bin/cp /opt/engine/.cache/config/inventory.ini ../inventory.ini
 # vim: set ts=2 sw=2 expandtab: