X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcloudtaf.git;a=blobdiff_plain;f=resources%2Fscripts%2Fbuild-test-containers.sh;fp=resources%2Fscripts%2Fbuild-test-containers.sh;h=a6b3a5b19eb099b0d49ddd6d15dc11525207bbc6;hp=0000000000000000000000000000000000000000;hb=af5eb3ff36b92ab1d9c156ffa0391eadc73eb6ba;hpb=025a45508d009db84c34076fb4a668f712628d6d diff --git a/resources/scripts/build-test-containers.sh b/resources/scripts/build-test-containers.sh new file mode 100755 index 0000000..a6b3a5b --- /dev/null +++ b/resources/scripts/build-test-containers.sh @@ -0,0 +1,16 @@ +#!/bin/bash -ex + +. include/crf-registry +test_conatiners=`ls ../test_containers/` +for val in $test_conatiners +do + echo "### Building $val test container" + + 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 ${REG}:${REG_PORT}/${REG_PATH}/${val}:latest ../test_containers/${val}/ + + docker save ${REG}:${REG_PORT}/${REG_PATH}/${val}:latest -o ../test_containers/${val}.tar + + echo ${val} test container is saved to ../test_containers/${val}/${val}.tar +done + +echo ">> Done"