From 0913c6350d626ce69174a05657988f753e6ea5ad Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Mon, 4 Mar 2019 19:55:02 -0500 Subject: [PATCH] Search for CFG & YAML files in specific dirs These file locations are standard locations in our CI setup so be specific of where to search for them. This prevents the scripts from picking up data from test files in global-jjb. Change-Id: Ia486ae8704b77f9303b5a2e54c4ffaf5de41aef8 Signed-off-by: Thanh Ha --- shell/openstack-protect-in-use-images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.16.6