blob: 90fbcf8c0f6d0417c85007199193b57ef289f088 [file] [log] [blame]
Victor Morales89ce3212017-06-16 18:32:48 -05001#!/bin/bash
2
Victor Morales0f94b4a2017-09-01 18:42:40 -05003source /var/onap/functions
4
Victor Morales0f94b4a2017-09-01 18:42:40 -05005# _setup_ete_folder() - Create and copy ete folder structure
6function _setup_ete_folder {
Victor Morales89ce3212017-06-16 18:32:48 -05007 mkdir -p /opt/eteshare/config
8
Victor Morales5d21f642017-12-07 11:54:59 -08009 cp $robot_src_folder/integration_* /opt/eteshare/config
10 cp $robot_src_folder/vm_config2robot.sh /opt/eteshare/config
11 cp $robot_src_folder/ete.sh /opt
12 cp $robot_src_folder/demo.sh /opt
Victor Morales89ce3212017-06-16 18:32:48 -050013
14 chmod +x /opt/ete.sh
15 chmod +x /opt/demo.sh
16}
17
Victor Morales0f94b4a2017-09-01 18:42:40 -050018# get_robot_images() - Pull or build the Robot Docker images
19function get_robot_images {
Victor Morales89ce3212017-06-16 18:32:48 -050020 pull_openecomp_image testsuite
Victor Morales0f94b4a2017-09-01 18:42:40 -050021}
22
23# install_robot() - Run Robot services
24function install_robot {
Victor Morales89ce3212017-06-16 18:32:48 -050025 docker rm -f openecompete_container
Victor Morales9d205bc2017-12-01 17:52:07 -080026 run_docker_image -d --name openecompete_container -v /opt/eteshare:/share -p 88:88 $nexus_docker_repo/openecomp/testsuite:$docker_version
Victor Morales89ce3212017-06-16 18:32:48 -050027}
28
29# init_robot() - Function that initialize Robot services
30function init_robot {
Victor Morales0f94b4a2017-09-01 18:42:40 -050031 if [[ "$clone_repo" == "True" ]]; then
Victor Morales5d21f642017-12-07 11:54:59 -080032 clone_repos "robot" "testsuite"
Victor Morales0f94b4a2017-09-01 18:42:40 -050033 _setup_ete_folder
34 if [[ "$compile_repo" == "True" ]]; then
Victor Morales5d21f642017-12-07 11:54:59 -080035 compile_repos "robot"
Victor Morales0f94b4a2017-09-01 18:42:40 -050036 fi
37 fi
Victor Morales6a919972017-09-28 18:29:54 -070038
39 if [[ "$skip_get_images" == "False" ]]; then
40 get_robot_images
41 if [[ "$skip_install" == "False" ]]; then
42 install_robot
43 fi
44 fi
Victor Morales89ce3212017-06-16 18:32:48 -050045}