From: Alexandru Avadanii Date: Wed, 4 Oct 2017 17:43:12 +0000 (+0200) Subject: fetch_os_creds.sh: Fix unbound BUILD_TAG X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=3f27c8b519e42295bd76ace5506903f265e48560;p=releng.git fetch_os_creds.sh: Fix unbound BUILD_TAG Fuel baremetal deployments provide a certificate, which should be copied over to test containers. Virtual deployments do not, hence the need to determine the deployment type and decide whether the certificate should be transferred in the first place. However, the Docker args we contruct will try to map the certificate file no matter what, so we will instead try to transfer the cert from Salt Master in all deployments, and just create an empty file in case it does not exist. Change-Id: I3d3fe6cabf552a88841c529ce38446b2e54b3053 Signed-off-by: Alexandru Avadanii --- diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index ac7595053..7a79da4f4 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -114,10 +114,8 @@ if [ "$installer_type" == "fuel" ]; then ssh ${ssh_options} "${ssh_user}@${controller_ip}" \ "sudo cat /root/keystonercv3" > "${dest_path}" - if [[ "${BUILD_TAG}" =~ "baremetal" ]]; then - ssh ${ssh_options} "${ssh_user}@${installer_ip}" \ - "cat /etc/ssl/certs/os_cacert" > "${os_cacert}" - fi + ssh ${ssh_options} "${ssh_user}@${installer_ip}" \ + "cat /etc/ssl/certs/os_cacert" > "${os_cacert}" || touch "${os_cacert}" else env=$(sshpass -p r00tme ssh 2>/dev/null ${ssh_options} root@${installer_ip} \ 'fuel env'|grep operational|head -1|awk '{print $1}') &> /dev/null