diff options
Diffstat (limited to 'functest/ci')
-rw-r--r-- | functest/ci/add_proxy.sh | 9 | ||||
-rw-r--r-- | functest/ci/convert_images.sh | 8 | ||||
-rw-r--r-- | functest/ci/download_images.sh | 2 |
3 files changed, 11 insertions, 8 deletions
diff --git a/functest/ci/add_proxy.sh b/functest/ci/add_proxy.sh index 082141073..9d7db22e4 100644 --- a/functest/ci/add_proxy.sh +++ b/functest/ci/add_proxy.sh @@ -1,8 +1,9 @@ -#!/bin/bash +#!/bin/sh set -e -pushd "${1:-/home/opnfv/functest/images}" > /dev/null +initdir=$(pwd) +cd "${1:-/home/opnfv/functest/images}" http_proxy_host=${http_proxy_host:-proxy} http_proxy_port=${http_proxy_port:-8080} @@ -89,7 +90,7 @@ for image in $images; do fi guestmount -a "${image}" -i --rw "${tmpdir}" add_proxy "${tmpdir}/etc/environment" - if [[ ${image} == "ubuntu"* ]]; then + if expr "$image" : 'ubuntu' ; then add_proxy_apt "${tmpdir}/etc/apt/apt.conf" add_proxy_juju_env "${tmpdir}/etc/juju-proxy.conf" add_proxy_juju_systemd "${tmpdir}/etc/juju-proxy-systemd.conf" @@ -133,5 +134,5 @@ else fi rmdir "${tmpdir}" -popd > /dev/null +cd initdir diff --git a/functest/ci/convert_images.sh b/functest/ci/convert_images.sh index d7ed3887b..2159d2a60 100644 --- a/functest/ci/convert_images.sh +++ b/functest/ci/convert_images.sh @@ -1,11 +1,13 @@ -#!/bin/bash +#!/bin/sh set -ex -pushd "${1:-/home/opnfv/functest/images}" +initdir=$(pwd) + +cd "${1:-/home/opnfv/functest/images}" for i in *.img *.qcow2; do qemu-img convert -f qcow2 -O vmdk "$i" "${i%.*}.vmdk" done -popd +cd $initdir diff --git a/functest/ci/download_images.sh b/functest/ci/download_images.sh index 72e885530..6bafc7837 100644 --- a/functest/ci/download_images.sh +++ b/functest/ci/download_images.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -ex |