Merge "Fix packaging tox-verify to run only master"
[releng/builder.git] / jjb / opendaylight-infra-check-image-protection.sh
index 8fc95cf3fc2054643e4d94282c29a62df28c241f..df660c96a9996cfb612d27d30c5e3e0dd8e8cb82 100644 (file)
@@ -8,7 +8,6 @@
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
-echo "---> Protect used images"
 
 # Checks the image "protected" value and set "True" marker
 #
@@ -31,10 +30,10 @@ readarray -t images <<< "$(grep -r _system_image: --include \*.yaml \
     | awk -F": " -e '{print $3}' | sed "s:'::;s:'$::;/^$/d" | sort | uniq)"
 
 for image in "${images[@]}"; do
-    os_image_protected=$(openstack --os-cloud $OS_CLOUD image show "$image" -f value -c protected)
+    os_image_protected=$(openstack --os-cloud "$OS_CLOUD" image show "$image" -f value -c protected)
     echo "Protected setting for $image: $os_image_protected"
     if [[ $os_image_protected != True ]]; then
         echo "Image: $image NOT set as protected, changing the protected value."
-        openstack --os-cloud $OS_CLOUD image set --protected "$image"
+        openstack --os-cloud "$OS_CLOUD" image set --protected "$image"
     fi
 done