X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2Fenvs%2Futils.sh;h=5db55bef83bfdbcd3d7565ef8ec712ba1773977a;hb=refs%2Fchanges%2F61%2F21261%2F5;hp=f582b5aac97ddd22853068ccb8945f0458f8c474;hpb=b8f6485d5a5c66f0fce566e59b8b5891c6a7f571;p=kvmfornfv.git diff --git a/ci/envs/utils.sh b/ci/envs/utils.sh index f582b5aac..5db55bef8 100755 --- a/ci/envs/utils.sh +++ b/ci/envs/utils.sh @@ -18,6 +18,12 @@ function getKernelVersion { #Get the IP address from pod.yaml file (example ip : 10.2.117.23) function getHostIP { - HOST_IP=`grep 'ip' $WORKSPACE/tests/pod.yaml | awk -F ': ' '{print $NF}' | tail -1` + host_dir="/root/workspace/scripts/" + container_dir="/opt/scripts/" + if [ -d "$container_dir" ];then + HOST_IP=`grep 'ip' $container_dir/pod.yaml | awk -F ': ' '{print $NF}' | tail -1` + elif [ -d "$host_dir" ];then + HOST_IP=`grep 'ip' $host_dir/pod.yaml | awk -F ': ' '{print $NF}' | tail -1` + fi echo $HOST_IP }