Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Chenxiong Qi <[email protected]>
  • Loading branch information
tkdchen committed Jan 9, 2025
1 parent 5720fbf commit e029c3f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions hack/validate-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ declare -r DEFAULT_BRANCH
: "${IN_CLUSTER:=""}"
declare -r IN_CLUSTER

#
prepare_pipelines() {
local -a pl_names_in_config
local pushed_pipelines
Expand All @@ -55,7 +54,7 @@ prepare_pipelines() {
tkn bundle list "$pl_bundle" pipeline "$pl_name" -o yaml \
>"${WORK_DIR}/pipelines/pushed/${pl_name}.yaml"
done <<<"$pushed_pipelines"

mkdir -p "${WORK_DIR}/pipelines/local"
kubectl kustomize --output "${WORK_DIR}/pipelines/local" pipelines/

Expand Down Expand Up @@ -84,8 +83,8 @@ prepare_pipelines() {
{\"name\": \"kind\", \"value\": \"task\"}
]
}"
task_selector="((.spec.tasks[], .spec.finally[]) | select(.name == \"${task_name}\")"
yq -i "${task_selector} | .taskRef) |= ${fake_bundle_ref}" "$file_path"
task_selector="(.spec.tasks[], .spec.finally[]) | select(.name == \"${task_name}\")"
yq -i "(${task_selector} | .taskRef) |= ${fake_bundle_ref}" "$file_path"
done
fi
done
Expand Down

0 comments on commit e029c3f

Please sign in to comment.