X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fcommon.sh;fp=resources%2Flibraries%2Fbash%2Ffunction%2Fcommon.sh;h=2b1a7f51285825c4c6e64ea97761009aa87e739c;hp=e1bf88db9d0b452a418efc687f2d714cf9afd2dd;hb=9c0f0ca1d9a60649cc46980d447c5d567c63cf2d;hpb=aad45d97721bb9b054681914c92f125123fba05a diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index e1bf88db9d..2b1a7f5128 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -42,7 +42,6 @@ function activate_docker_topology () { source "${BASH_FUNCTION_DIR}/device.sh" || { die "Source failed!" } - device_image="$(< ${CSIT_DIR}/${IMAGE_VER_FILE})" case_text="${NODENESS}_${FLAVOR}" case "${case_text}" in @@ -50,8 +49,9 @@ function activate_docker_topology () { # We execute reservation over csit-shim-dcr (ssh) which runs sourced # script's functions. Env variables are read from ssh output # back to localhost for further processing. - hostname=$(grep search /etc/resolv.conf | cut -d' ' -f3) || die - ssh="ssh root@${hostname} -p 6022" + # Shim and Jenkins executor are in the same network on the same host + # Connect to docker's default gateway IP and shim's exposed port + ssh="ssh root@172.17.0.1 -p 6022" run="activate_wrapper ${NODENESS} ${FLAVOR} ${device_image}" # The "declare -f" output is long and boring. set +x @@ -333,8 +333,7 @@ function deactivate_docker_topology () { case_text="${NODENESS}_${FLAVOR}" case "${case_text}" in "1n_skx" | "1n_tx2") - hostname=$(grep search /etc/resolv.conf | cut -d' ' -f3) || die - ssh="ssh root@${hostname} -p 6022" + ssh="ssh root@172.17.0.1 -p 6022" env_vars=$(env | grep CSIT_ | tr '\n' ' ' ) || die # The "declare -f" output is long and boring. set +x