X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=functest%2Fci%2Fadd_proxy.sh;h=3244f246a449d37b708caf2853a764ce6f6a00b5;hb=2a0702ea914a574ffa7c6d6f83a5c606e24ebd0a;hp=d191538117d4712b137993cf6e01685b769eb129;hpb=d5fce8c12bc73c1b1547df2750563c271a3ab3f6;p=functest.git diff --git a/functest/ci/add_proxy.sh b/functest/ci/add_proxy.sh index d19153811..3244f246a 100644 --- a/functest/ci/add_proxy.sh +++ b/functest/ci/add_proxy.sh @@ -22,6 +22,13 @@ NO_PROXY=${no_proxy:-"10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"} EOF } +add_proxy_apt () { + cat << EOF >> "$1" +Acquire::http::Proxy "${http_proxy:-http://proxy:8080}"; +Acquire::https::Proxy "${https_proxy:-http://proxy:8080}"; +EOF +} + tmpdir=$(mktemp -d) for image in $images; do if [ ! -f "$image" ]; then @@ -31,9 +38,14 @@ for image in $images; do guestmount -a "${image}" -i --rw "${tmpdir}" add_proxy "${tmpdir}/etc/environment" if [[ ${image} == *"cloudify-manager"* ]]; then + echo >> "${tmpdir}/etc/sysconfig/cloudify-mgmtworker" add_proxy "${tmpdir}/etc/sysconfig/cloudify-mgmtworker" + echo >> "${tmpdir}/etc/sysconfig/cloudify-restservice" add_proxy "${tmpdir}/etc/sysconfig/cloudify-restservice" fi + if [[ ${image} == "ubuntu"* ]]; then + add_proxy_apt "${tmpdir}/etc/apt/apt.conf" + fi guestunmount "${tmpdir}" done