1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00

[tekton-publish-catalog] Fix syntax of find command

The syntax of the find command was not correct, and the error was not
caught by CI because of the missing "set -o pipefail".

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
This commit is contained in:
Andrea Frittoli 2021-05-04 14:34:16 +01:00 committed by tekton-robot
parent 1160467eb9
commit 9095458f98

View File

@ -62,10 +62,10 @@ spec:
value: $(params.TAG)
script: |
#!/usr/bin/env sh
set -e
set -e -o pipefail
TARGET="${REGISTRY}"
[ "${REGISTRY_PATH}" != "" ] && TARGET="${TARGET}/${REGISTRY_PATH}"
find task -type f -mindepth 3 -maxdepth 3 -name '*.yaml' -o '*.yml'| while read -r task_version_dir; do
find task -type f -mindepth 3 -maxdepth 3 -name '*.yaml' -o -name '*.yml'| while read -r task_version_dir; do
FOLDER=$(dirname "$task_version_dir")
VERSION=$(basename "$FOLDER")
TASK=$(basename "$(dirname "$FOLDER")")
@ -73,4 +73,4 @@ spec:
[ "${TAG}" != "" ] && \
tkn bundle push "${TARGET}/${TASK}:${TAG}" -f "$task_version_dir"
sleep 0.1
done
done