Improve python-tools-install.sh alpine compat
[releng/global-jjb.git] / shell / jenkins-verify-images.sh
index f05e3c3..d005c52 100755 (executable)
@@ -39,15 +39,14 @@ verify_images()
   done
 }
 
+echo "Verifying that cloud has a master configuration file"
 for cloud in jenkins-config/clouds/openstack/*; do
-  echo "Verifying that cloud has a master configuration file"
-  # Verify that we have a cloud config file
-  if [ -f "$cloud/cloud.cfg" ]; then
-    # Get the OS_CLOUD variable from cloud config and export it
-    OS_CLOUD=$(grep ^CLOUD_CREDENTIAL_ID= "$cloud/cloud.cfg" | cut -d'=' -f2)
-    export OS_CLOUD
-
-    verify_images "$cloud"
+  if [[ -f $cloud/cloud.cfg ]]; then
+    # Get the OS_CLOUD variable from cloud config
+    if ! os_cloud=$(grep -E "^OS_CLOUD=" "$cloud/cloud.cfg" | cut -d'=' -f2); then
+      os_cloud="vex"
+    fi
+    OS_CLOUD=$os_cloud verify_images "$cloud"
   else
     echo "ERROR: No cloud.cfg for $cloud"
     error=true