From 3cad6f37aff90f01f161563741be7897b50a1188 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Wed, 15 Nov 2017 23:29:11 -0800 Subject: Auto-generate docker versions and repo branches Auto-generate the docker versions and repo branches using the latest heat environment file from demo repo. Change-Id: Ia00ec9f1c0bc59d0cdf9639e0d5ac5b13f9716c8 Issue-ID: INT-278 Signed-off-by: Gary Wu --- test/ete/scripts/deploy-onap.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'test/ete/scripts') diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh index 4802e02ce..9919fe788 100755 --- a/test/ete/scripts/deploy-onap.sh +++ b/test/ete/scripts/deploy-onap.sh @@ -28,14 +28,23 @@ STACK="ete-$(uuidgen | cut -c-8)" echo "New Stack Name: ${STACK}" +SENTINEL='Docker versions and branches' +ENV_FILE=${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-demo.env -envsubst < ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env > ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env +envsubst < ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env | sed -n "1,/${SENTINEL}/p" > ${ENV_FILE} +pushd ${ONAP_WORKDIR}/demo +echo " # Rest of the file was AUTO-GENERATED from" +echo " #" $(git config --get remote.origin.url) heat/ONAP/onap_openstack.env $(git rev-parse HEAD) | tee -a ${ENV_FILE} +popd +sed "1,/${SENTINEL}/d" ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env >> ${ENV_FILE} +cat ${ENV_FILE} + #diff ${WORKSPACE}/test/ete/labs/windriver/onap-openstack-template.env ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env $STACK while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $STACK)" ]; do - sleep 15 + sleep 20 done STATUS=$(openstack stack show -c stack_status -f value $STACK) @@ -59,5 +68,5 @@ SSH_KEY=~/.ssh/onap_key until ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "docker ps | grep -q openecompete_container" do - sleep 1m + sleep 2m done -- cgit 1.2.3-korg