X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fcopy-common-functions.sh;h=660dbacaf6a3dc1eb174dae20e358d2f4d96bb0a;hb=247f49ccf444c0b20c35ae6d952ad2a6d538e52c;hp=c8835aad2bbcf5a509b2b79962ac5f68040c48a3;hpb=0c768872e5b0a44b7b43cf85090816ba4cbcbd21;p=releng%2Fbuilder.git diff --git a/jjb/integration/copy-common-functions.sh b/jjb/integration/copy-common-functions.sh index c8835aad2..660dbacaf 100644 --- a/jjb/integration/copy-common-functions.sh +++ b/jjb/integration/copy-common-functions.sh @@ -7,14 +7,21 @@ # script is executing rather than being sourced. When executed the condition # is true and copies the script. In the false path this copy below is skipped # and the sourcing continues so that the appended common-function.sh ends up sourced. -if [ "${BASH_SOURCE[0]}" == "${0}" ]; then +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + # shellcheck disable=SC1090 + . ~/lf-env.sh + + lf-activate-venv --python python3 \ + python-heatclient \ + python-openstackclient + echo "Copying common-functions.sh to /tmp" cp "${0}" /tmp/common-functions.sh mapfile -t ips <<< "$(openstack stack show -f json -c outputs "$STACK_NAME" | jq -r '.outputs[] | select(.output_key | match("^vm_[0-9]+_ips$")) | .output_value | .[]')" for ip in "${ips[@]}"; do echo "Copying common-functions.sh to ${ip}:/tmp" - scp /tmp/common-functions.sh ${ip}:/tmp + scp /tmp/common-functions.sh "${ip}:/tmp" done exit 0 fi