engine: Create openstack release jobs
[infra/cicd.git] / jjb / cloud-infra / promote-onap.sh
index 2ac25dd2e7e9200ee300361fd9c87a4360c4f1a2..9de2480f12a11802cff3824db6f4bb33412b0e79 100644 (file)
@@ -22,9 +22,17 @@ set -o errexit
 set -o nounset
 
 cd $WORKSPACE
-echo "Info: Promoting ONAP"
+echo "Info: Promoting ONAP. Please note that this may take about 3 hours to complete. Do not interrupt!"
 echo "-------------------------------------------------------------------------"
-echo "Warning: Not implemented!"
+cd /tmp && /bin/rm -rf $WORKSPACE
+git clone -q https://gerrit.nordix.org/infra/swconfig.git $WORKSPACE
+cd $WORKSPACE/scenarios/onap-nofeature-noha/kubespray/playbooks
+# avoid PS1: unbound variable issue
+set +u
+source /opt/engine/.venv/bin/activate
+set -u
+ansible-playbook -i /tmp/inventory.ini promote.yml
 echo "-------------------------------------------------------------------------"
+echo "Info: Promotion done!"
 
 # vim: set ts=2 sw=2 expandtab: