Merge "Add release note for capture-instance-metadata"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 23 Sep 2020 17:54:17 +0000 (17:54 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Wed, 23 Sep 2020 17:54:17 +0000 (17:54 +0000)
releasenotes/notes/fix_jenkins_image_verify-b2588bd58ddc2f83.yaml [new file with mode: 0644]
shell/jenkins-verify-images.sh

diff --git a/releasenotes/notes/fix_jenkins_image_verify-b2588bd58ddc2f83.yaml b/releasenotes/notes/fix_jenkins_image_verify-b2588bd58ddc2f83.yaml
new file mode 100644 (file)
index 0000000..7317e63
--- /dev/null
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    When evaluating jenkins-config management changes, if a system does not have
+    an openstack cloud defined, we should not fail the job. Instead we now
+    just skip that configuration and verification
index d005c52..663dfb6 100755 (executable)
@@ -40,18 +40,20 @@ verify_images()
 }
 
 echo "Verifying that cloud has a master configuration file"
-for cloud in jenkins-config/clouds/openstack/*; do
-  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"
+if [[ -d jenkins-config/clouds/openstack ]]; then
+  for cloud in jenkins-config/clouds/openstack/*; do
+    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
     fi
-    OS_CLOUD=$os_cloud verify_images "$cloud"
-  else
-    echo "ERROR: No cloud.cfg for $cloud"
-    error=true
-  fi
-done
+  done
+fi
 
 if $error; then
   exit 1