X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fopenstack-protect-in-use-images.sh;h=4d9a2cc8badde81acab57ca7f7565b8b28685d69;hb=0913c6350d626ce69174a05657988f753e6ea5ad;hp=a23a4ed81b675edf8149e9de8c6fc478bbe11a72;hpb=65a04d5bb3369b132d1fbbbe6405cac3c65db955;p=releng%2Fglobal-jjb.git diff --git a/shell/openstack-protect-in-use-images.sh b/shell/openstack-protect-in-use-images.sh index a23a4ed8..4d9a2cc8 100644 --- a/shell/openstack-protect-in-use-images.sh +++ b/shell/openstack-protect-in-use-images.sh @@ -24,9 +24,9 @@ set -eu -o pipefail declare -a images declare -a cfg_images declare -a yaml_images -readarray -t cfg_images <<< "$(grep -r IMAGE_NAME --include \*.cfg \ +readarray -t cfg_images <<< "$(grep -r IMAGE_NAME --include \*.cfg jenkins-config \ | awk -F'=' '{print $2}' | sort -u)" -readarray -t yaml_images <<< "$(grep -r 'ZZCI - ' --include \*.yaml \ +readarray -t yaml_images <<< "$(grep -r 'ZZCI - ' --include \*.yaml jjb \ | awk -F": " '{print $3}' | sed "s:'::;s:'$::;/^$/d" | sort -u)" mapfile -t images < <(for R in "${cfg_images[@]}" "${yaml_images[@]}" ; do echo "$R" ; done | sort -u)