diff --git a/newsfragments/1800.internal.md b/newsfragments/1800.internal.md new file mode 100644 index 00000000..bdc01358 --- /dev/null +++ b/newsfragments/1800.internal.md @@ -0,0 +1 @@ +CI: Fix `yq` must `split-expr` in the target directory directly. diff --git a/scripts/render_ci_manifests.sh b/scripts/render_ci_manifests.sh index f114563b..46d736b5 100755 --- a/scripts/render_ci_manifests.sh +++ b/scripts/render_ci_manifests.sh @@ -32,7 +32,7 @@ render_values_file() { -a cert-manager.io/v1/Certificate \ -f "$values" "$chart_dir") | \ yq ea '[.] | .[] | splitDoc' | \ - yq -s "\"$output_dir/$values_file/\" + ([.kind, .metadata.name] | join(\"-\") | downcase) + \".yaml\"" + (cd "$output_dir/$values_file" && yq -s "([.kind, .metadata.name] | join(\"-\") | downcase) + \".yaml\"") } export -f render_values_file export chart_dir output_dir