X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fupdate-cloud-images.sh;h=d3cd18fcf9e8f9c1b88f448df07d433d4126d199;hb=32fc471adb587ff7ee252ebd1b1e6664119185ea;hp=6b39c7ccb456212e60b62a2065b00effe002f7aa;hpb=4028ad2bc487460837736f040d885c3674b39031;p=releng%2Fglobal-jjb.git diff --git a/shell/update-cloud-images.sh b/shell/update-cloud-images.sh index 6b39c7cc..d3cd18fc 100644 --- a/shell/update-cloud-images.sh +++ b/shell/update-cloud-images.sh @@ -44,6 +44,9 @@ while read -r line ; do # var is unset and update all images on Jenkins to the latest. if [[ ${NEW_IMAGE_NAME} != all ]]; then new_image=${NEW_IMAGE_NAME} + new_image_type="${NEW_IMAGE_NAME% -*}" + # get the $new_image_type to check the image type is being compared + [[ ${new_image_type} =~ ${image_type} ]] && continue else new_image=$(openstack image list --long -f value -c Name -c Protected \ | grep "${image_type}.*False" | tail -n-1 | sed 's/ False//')