From 48036e281e03fdb6694ec7793e91b4f4375f60ba Mon Sep 17 00:00:00 2001 From: Zoran Regvart Date: Thu, 4 Jul 2024 16:19:05 +0200 Subject: [PATCH 1/2] Skip bundle list files that have not been created Follow up to #1112, let's not confuse folk by printing: ``` cat: /workspace/source/task-bundle-list-konflux-ci: No such file or directory cat: /workspace/source/task-bundle-list-appstudio: No such file or directory ``` In the TaskRun logs. Those files do not exist if no Tasks were changed. Reference: https://issues.redhat.com/browse/EC-705 --- .tekton/push.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.tekton/push.yaml b/.tekton/push.yaml index e90c08c412..e2ab0795b2 100644 --- a/.tekton/push.yaml +++ b/.tekton/push.yaml @@ -132,7 +132,12 @@ spec: DATA_BUNDLE_TAG=$(date '+%s') export DATA_BUNDLE_REPO DATA_BUNDLE_TAG - .tekton/scripts/build-acceptable-bundles.sh "$@" + list=() + for f in "$@"; do + [[ -f "$f" ]] && list+=("$f") + done + + .tekton/scripts/build-acceptable-bundles.sh "${list[*]}" echo -n "${DATA_BUNDLE_TAG}" > acceptable_bundle_tag args: From 5da3df3302003d8fdf6f3f1755870f9898d25cb0 Mon Sep 17 00:00:00 2001 From: Zoran Regvart Date: Thu, 4 Jul 2024 16:59:40 +0200 Subject: [PATCH 2/2] Update .tekton/push.yaml Co-authored-by: Adam Cmiel --- .tekton/push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tekton/push.yaml b/.tekton/push.yaml index e2ab0795b2..74db143cb3 100644 --- a/.tekton/push.yaml +++ b/.tekton/push.yaml @@ -137,7 +137,7 @@ spec: [[ -f "$f" ]] && list+=("$f") done - .tekton/scripts/build-acceptable-bundles.sh "${list[*]}" + .tekton/scripts/build-acceptable-bundles.sh "${list[@]}" echo -n "${DATA_BUNDLE_TAG}" > acceptable_bundle_tag args: