Don't fail if docker images output is missing

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: Ib2a8d43c98ec8147ed28f23447faef0deeb6033f
This commit is contained in:
Davlet Panech 2022-10-07 16:26:57 -04:00
parent 36303c05eb
commit 0d1d0e9f0c
1 changed files with 13 additions and 6 deletions

View File

@ -22,14 +22,21 @@ link_target=$(basename "$BUILD_OUTPUT_HOME")
# find image list files
image_list_files_str="$(
find "$BUILD_OUTPUT_HOME/workspace/std/build-images" \
-mindepth 1 -maxdepth 1 \
-type f -name 'images-*.lst' \
| sed -r -e 's/^\s+//' -e 's/\s+$//' \
| grep -E -v -e '^\s#' -e '^\s*$'
set -x
dir="$BUILD_OUTPUT_HOME/workspace/std/build-images"
if [[ -d "$dir" ]] ; then
find "$dir" \
-mindepth 1 -maxdepth 1 \
-type f -name 'images-*.lst' \
| sed -r -e 's/^\s+//' -e 's/\s+$//' \
| grep -E -v -e '^\s#' -e '^\s*$' \
|| true
fi
)" || exit 1
declare -a image_list_files
readarray -t image_list_files <<<"$image_list_files_str"
if [[ -n "$image_list_files_str" ]] ; then
readarray -t image_list_files <<<"$image_list_files_str"
fi
# more than one - success
if [[ "${#image_list_files[@]}" -gt 0 ]] ; then