robot tcs, test charts, robot container added
[ta/cloudtaf.git] / resources / scripts / robot-test-build.sh
1 #!/bin/bash -ex
2
3 env_file=${1:-include/robot_container.env}
4 source ${env_file}
5 ROBOT_CONTAINER_PATH=../robot_container/
6
7 yes | cp -rf ../../libraries/ ${ROBOT_CONTAINER_PATH}
8 yes | cp -rf ../../testcases/ ${ROBOT_CONTAINER_PATH}
9 mkdir -p ${ROBOT_CONTAINER_PATH}resources/
10 yes | cp -rf ../../resources/scripts/ ${ROBOT_CONTAINER_PATH}resources/
11 yes | cp -rf ../../resources/test_charts/ ${ROBOT_CONTAINER_PATH}resources/
12 yes | cp -rf ../../resources/test_containers/ ${ROBOT_CONTAINER_PATH}resources/
13
14 docker build --network=host --no-cache --build-arg HTTP_PROXY="${http_proxy}" --build-arg HTTPS_PROXY="${https_proxy}" --build-arg NO_PROXY="${no_proxy}" --build-arg http_proxy="${http_proxy}" --build-arg https_proxy="${https_proxy}" --build-arg no_proxy="${no_proxy}" --tag ${ROBOT_CONTAINER_TAG} ${ROBOT_CONTAINER_PATH}
15
16 rm -rf ${ROBOT_CONTAINER_PATH}/libraries/ ${ROBOT_CONTAINER_PATH}/testcases/ ${ROBOT_CONTAINER_PATH}/resources/
17   
18 echo ">> Done"