diff options
Diffstat (limited to 'scripts')
4 files changed, 36 insertions, 15 deletions
diff --git a/scripts/clamp/clone_clamp_and_change_dockercompose.sh b/scripts/clamp/clone_clamp_and_change_dockercompose.sh index 4e3eb582..c807091e 100755 --- a/scripts/clamp/clone_clamp_and_change_dockercompose.sh +++ b/scripts/clamp/clone_clamp_and_change_dockercompose.sh @@ -41,5 +41,5 @@ sed -i '/image: onap\/clamp/c\ image: nexus3.onap.org:10001\/onap\/clamp' doc sed -i 's/}/,\"clamp.config.policy.pdpUrl1\":\"http:\/\/third_party_proxy:8085\/pdp\/ , testpdp, alpha123\",\"clamp.config.policy.pdpUrl2\":\"http:\/\/third_party_proxy:8085\/pdp\/ , testpdp, alpha123\",\"clamp.config.policy.papUrl\":\"http:\/\/third_party_proxy:8085\/pap\/ , testpap, alpha123\",\"clamp.config.policy.clientId\":\"python\",\"clamp.config.policy.clientKey\":\"dGVzdA==\",\"clamp.config.sdc.catalog.url\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/\",\"clamp.config.sdc.hostUrl\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.sdc.serviceUrl\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/services\",\"clamp.config.dcae.inventory.url\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.dcae.dispatcher.url\":\"http:\/\/third_party_proxy:8085\",\"spring.profiles.active\":\"clamp-default,clamp-default-user,clamp-sdc-controller\",\"server.ssl.client-auth\":\"want\"}/g' clamp.env # Add the sql to create template so it is played by docker-compose later -cp ../../../src/test/resources/sql/four_templates_only.sql ../../sql/bulkload/ -echo 'mysql -uroot -p$MYSQL_ROOT_PASSWORD -f < four_templates_only.sql' >> ../../sql/load-sql-files-tests-automation.sh +cp ../../../src/test/resources/sql/loop-examples.sql ../../sql/bulkload/ +echo 'mysql -uroot -p$MYSQL_ROOT_PASSWORD -f < loop-examples.sql' >> ../../sql/load-sql-files-tests-automation.sh diff --git a/scripts/clamp/start_clamp_containers.sh b/scripts/clamp/start_clamp_containers.sh index 8da83405..443c9fa0 100755 --- a/scripts/clamp/start_clamp_containers.sh +++ b/scripts/clamp/start_clamp_containers.sh @@ -49,5 +49,5 @@ if [ "$TIME" -ge "$TIME_OUT" ]; then exit 1; fi -sleep 30 +sleep 20 diff --git a/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh b/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh index 03fca804..3b2de744 100644 --- a/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh +++ b/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh @@ -25,14 +25,34 @@ echo "This is ${WORKSPACE}/scripts/cmso/clone_cmso_and_change_dockercompose.sh" # Clone cmso repo to get extra folder that has all needed to run docker with docker-compose to start DB and cmso-service and cmso-dbinit -mkdir -p $WORKSPACE/archives/cmso-clone -cd $WORKSPACE/archives/cmso-clone +mkdir -p /tmp/$WORKSPACE/archives/cmso-clone +cd /tmp/$WORKSPACE/archives/cmso-clone git clone --depth 1 https://gerrit.onap.org/r/optf/cmso -b master -cd cmso/cmso-service/extra/docker +cd cmso/cmso-robot/docker/cmso-service -# Pull the cmso docker image from nexus instead of local image by default in the docker-compose.yml -sed -i '/image: onap\/optf-cmso-service/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-service' docker-compose.yml +sed -i '/image: onap\/optf-cmso-service/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-service:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-dbinit/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-dbinit:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-topology/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-topology:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-ticketmgt/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-ticketmgt:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-optimizer/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-optimizer:latest' docker-compose.yml +sed -i '/image: onap\/optf-cmso-robot/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-robot:latest' docker-compose.yml -sed -i '/image: onap\/optf-cmso-dbinit/c\ image: nexus3.onap.org:10001\/onap\/optf-cmso-dbinit' docker-compose.yml +pip uninstall docker-py; pip uninstall docker; pip install docker +#!/bin/bash +docker-compose up >up.txt 2>&1 & + + +### Wait for docker compose to complete +sleep 300 +echo =======================up.txt +cat up.txt +echo ======================= + +### Wait for robot to finish +docker exec cmsoservice_cmso-robot_1 ls +while [ $? -ne 1 ]; do + sleep 120 + docker exec cmsoservice_cmso-robot_1 ls +done diff --git a/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh b/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh index 681099ca..5d8c0597 100644 --- a/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh +++ b/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh @@ -19,13 +19,14 @@ # echo "This is ${WORKSPACE}/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh" +cd /tmp/$WORKSPACE/archives/cmso-clone +cd cmso/cmso-robot/docker/cmso-service +docker-compose down -kill-instance.sh cmso-service -kill-instance.sh cmso-mariadb -kill-instance.sh cmso-db-init +cp -f ./cmso-robot/logs/output.xml $WORKSPACE/archives +cp -f ./cmso-robot/logs/log.html $WORKSPACE/archives +cp -f ./cmso-robot/logs/report.html $WORKSPACE/archives -#delete cmso-clone folder - -rm -rf ${WORKSPACE}archives/cmso-clone +##rm -rf ${WORKSPACE}/archives/cmso-clone |