X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjenkins-verify-images.sh;h=a27efd83946aa8c8420322f2c3740d94bce6c340;hb=c6ecf9973a6b961bfd59040b49fb6565d82a1ee8;hp=f05e3c35b0a2d30a2da1f3ff5dce3d46ef5ed076;hpb=fe2beb15bc9effb5b91ba17b520ab6c167dd6604;p=releng%2Fglobal-jjb.git diff --git a/shell/jenkins-verify-images.sh b/shell/jenkins-verify-images.sh index f05e3c35..a27efd83 100755 --- a/shell/jenkins-verify-images.sh +++ b/shell/jenkins-verify-images.sh @@ -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=$(egrep "^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