X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjenkins-verify-images.sh;h=d005c52f0873b1c16ed408af3b1daaacf3944b97;hb=refs%2Ftags%2Fv0.57.0;hp=e4e9e7080261d08ce505e9ffa1fcb3fe32a00747;hpb=93a86e0271fa5fd4d1280007289e842edc558653;p=releng%2Fglobal-jjb.git diff --git a/shell/jenkins-verify-images.sh b/shell/jenkins-verify-images.sh index e4e9e708..d005c52f 100755 --- a/shell/jenkins-verify-images.sh +++ b/shell/jenkins-verify-images.sh @@ -39,16 +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 ^OS_CLOUD= "$cloud/cloud.cfg" | cut -d'=' -f2) - OS_CLOUD="${os_cloud:-vex}" - 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