blob: 70f8cf704d92b5aeeb4b5fd3b4704440e2fa70c2 [file] [log] [blame]
#!/bin/bash
source /var/onap/functions
# _setup_ete_folder() - Create and copy ete folder structure
function _setup_ete_folder {
mkdir -p /opt/eteshare/config
cp ${src_folders[robot]}/integration_* /opt/eteshare/config
cp ${src_folders[robot]}/vm_config2robot.sh /opt/eteshare/config
cp ${src_folders[robot]}/ete.sh /opt
cp ${src_folders[robot]}/demo.sh /opt
chmod +x /opt/ete.sh
chmod +x /opt/demo.sh
}
# get_robot_images() - Pull or build the Robot Docker images
function get_robot_images {
pull_openecomp_image testsuite
}
# install_robot() - Run Robot services
function install_robot {
docker rm -f openecompete_container
run_docker_image -d --name openecompete_container -v /opt/eteshare:/share -p 88:88 $nexus_docker_repo/openecomp/testsuite:$docker_version
}
# init_robot() - Function that initialize Robot services
function init_robot {
if [[ "$clone_repo" == "True" ]]; then
clone_repos "robot" "testsuite"
_setup_ete_folder
if [[ "$compile_repo" == "True" ]]; then
compile_repos "robot"
fi
fi
if [[ "$skip_get_images" == "False" ]]; then
get_robot_images
if [[ "$skip_install" == "False" ]]; then
install_robot
fi
fi
}