+ RESULTS_DIR=/var/workdir/release/1aaf80a4-abc1-43af-a69e-395217338016/results + TEMP_FILE=/tmp/temp.json + RESULTS_JSON=/tmp/results.json + echo '{}' ++ '[' -d /var/workdir/release/1aaf80a4-abc1-43af-a69e-395217338016/results ']' ++ find /var/workdir/release/1aaf80a4-abc1-43af-a69e-395217338016/results -type f + for resultsFile in $([ -d "$RESULTS_DIR" ] && find "$RESULTS_DIR" -type f) + jq . /var/workdir/release/1aaf80a4-abc1-43af-a69e-395217338016/results/push-snapshot-results.json + jq --slurpfile new /var/workdir/release/1aaf80a4-abc1-43af-a69e-395217338016/results/push-snapshot-results.json ' # Store current values as $base and get all unique keys from both objects . as $base | ($base | keys + ($new[0] | keys)) | unique | # Process each key and build the merged result reduce .[] as $key ({}; . + {($key): ( # Case 1: Both values are arrays - concatenate them if ($new[0][$key] | type == "array") and ($base[$key] | type == "array") then $base[$key] + $new[0][$key] else # Case 2: Both values are objects - merge them recursively if ($new[0][$key] | type == "object") and ($base[$key] | type == "object") then $base[$key] * $new[0][$key] # Case 3: Default - use new value or fall back to base value else $new[0][$key] // $base[$key] end end )}) ' /tmp/results.json + mv /tmp/temp.json /tmp/results.json ++ cat /tmp/results.json + FINAL_JSON='{ "images": [ { "arches": [ "amd64" ], "oses": [ "linux" ], "name": "tsf-demo-comp", "shasum": "sha256:9e39265fb940b712cc079cd80d738f3c32d8de21f3504bb76dc799fb912bbf1b", "urls": [ "quay.io/rhtap_qe/default-managed-tenant-pm9c4/default-managed-tenant-pm9c4-1e5ea0/tsf-demo-comp:4696c69e5553d4beb56ee857748e27a9a92218f2", "quay.io/rhtap_qe/default-managed-tenant-pm9c4/default-managed-tenant-pm9c4-1e5ea0/tsf-demo-comp:latest" ] } ] }' + IFS=/ + read -r namespace name ++ date +%s + PATCH_FILE=/tmp/patch-1777024213.json + echo 'status: {'\''artifacts'\'':{ "images": [ { "arches": [ "amd64" ], "oses": [ "linux" ], "name": "tsf-demo-comp", "shasum": "sha256:9e39265fb940b712cc079cd80d738f3c32d8de21f3504bb76dc799fb912bbf1b", "urls": [ "quay.io/rhtap_qe/default-managed-tenant-pm9c4/default-managed-tenant-pm9c4-1e5ea0/tsf-demo-comp:4696c69e5553d4beb56ee857748e27a9a92218f2", "quay.io/rhtap_qe/default-managed-tenant-pm9c4/default-managed-tenant-pm9c4-1e5ea0/tsf-demo-comp:latest" ] } ] }}' + kubectl --warnings-as-errors=true patch release -n default-tenant tsf-demo-app-20260424-093746-000-4696c69-nm28f --type=merge --subresource status --patch-file /tmp/patch-1777024213.json release.appstudio.redhat.com/tsf-demo-app-20260424-093746-000-4696c69-nm28f patched + rm -f /tmp/patch-1777024213.json