X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcloudtaf.git;a=blobdiff_plain;f=resources%2Fscripts%2Frobot-test-build.sh;fp=resources%2Fscripts%2Frobot-test-build.sh;h=54e72a432fe692677ae3cb2b5e44b8cd31f73af0;hp=0000000000000000000000000000000000000000;hb=af5eb3ff36b92ab1d9c156ffa0391eadc73eb6ba;hpb=025a45508d009db84c34076fb4a668f712628d6d diff --git a/resources/scripts/robot-test-build.sh b/resources/scripts/robot-test-build.sh new file mode 100755 index 0000000..54e72a4 --- /dev/null +++ b/resources/scripts/robot-test-build.sh @@ -0,0 +1,18 @@ +#!/bin/bash -ex + +env_file=${1:-include/robot_container.env} +source ${env_file} +ROBOT_CONTAINER_PATH=../robot_container/ + +yes | cp -rf ../../libraries/ ${ROBOT_CONTAINER_PATH} +yes | cp -rf ../../testcases/ ${ROBOT_CONTAINER_PATH} +mkdir -p ${ROBOT_CONTAINER_PATH}resources/ +yes | cp -rf ../../resources/scripts/ ${ROBOT_CONTAINER_PATH}resources/ +yes | cp -rf ../../resources/test_charts/ ${ROBOT_CONTAINER_PATH}resources/ +yes | cp -rf ../../resources/test_containers/ ${ROBOT_CONTAINER_PATH}resources/ + +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} + +rm -rf ${ROBOT_CONTAINER_PATH}/libraries/ ${ROBOT_CONTAINER_PATH}/testcases/ ${ROBOT_CONTAINER_PATH}/resources/ + +echo ">> Done"