Merge "Include yamllint on build servers"
[releng.git] / utils / fetch_os_creds.sh
index 7a79da4..b40b75b 100755 (executable)
@@ -114,8 +114,10 @@ if [ "$installer_type" == "fuel" ]; then
         ssh ${ssh_options} "${ssh_user}@${controller_ip}" \
             "sudo cat /root/keystonercv3" > "${dest_path}"
 
-        ssh ${ssh_options} "${ssh_user}@${installer_ip}" \
-            "cat /etc/ssl/certs/os_cacert" > "${os_cacert}" || touch "${os_cacert}"
+        if [[ ! "${BUILD_TAG}" =~ 'virtual' ]]; then
+            ssh ${ssh_options} "${ssh_user}@${installer_ip}" \
+                "cat /etc/ssl/certs/os_cacert" > "${os_cacert}"
+        fi
     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
@@ -162,7 +164,13 @@ elif [ "$installer_type" == "apex" ]; then
     if [ -f /root/.ssh/id_rsa ]; then
         chmod 600 /root/.ssh/id_rsa
     fi
-    sudo scp $ssh_options root@$installer_ip:/home/stack/overcloudrc.v3 $dest_path
+
+    if [ "${BRANCH}" == "stable/fraser" ]; then
+      rc_file=overcloudrc.v3
+    else
+      rc_file=overcloudrc
+    fi
+    sudo scp $ssh_options root@$installer_ip:/home/stack/${rc_file} $dest_path
 
 elif [ "$installer_type" == "compass" ]; then
     if [ "${BRANCH}" == "stable/danube" ]; then