summaryrefslogtreecommitdiffstats
path: root/test/ete/scripts
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-11-15 23:29:11 -0800
committerGary Wu <gary.i.wu@huawei.com>2017-11-15 23:29:56 -0800
commit3cad6f37aff90f01f161563741be7897b50a1188 (patch)
tree889aee9fb7ff7c5105874281ed6b99b41ed03894 /test/ete/scripts
parentbe4ca2e8e926d71387ff1d367898070459322891 (diff)
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 <gary.i.wu@huawei.com>
Diffstat (limited to 'test/ete/scripts')
-rwxr-xr-xtest/ete/scripts/deploy-onap.sh15
1 files changed, 12 insertions, 3 deletions
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