From 9b854aae1b2829608c01bd84a467dcec9258a68e Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 24 Oct 2024 16:45:18 -0400 Subject: [PATCH] fix: appease checkton Signed-off-by: Ralph Bean --- tasks/create-pyxis-image/create-pyxis-image.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tasks/create-pyxis-image/create-pyxis-image.yaml b/tasks/create-pyxis-image/create-pyxis-image.yaml index 372e295a4..af50c1185 100644 --- a/tasks/create-pyxis-image/create-pyxis-image.yaml +++ b/tasks/create-pyxis-image/create-pyxis-image.yaml @@ -199,14 +199,15 @@ spec: EXPANDED_SIZE=$(wc --bytes "${BLOB_FILE}" | awk '{print $1}' | tr -d '\n') # Append this information to the parsed_data manifest - cat <<< $(jq \ + jq \ '.uncompressed_layers += [{"digest": "'"$EXPANDED_DIGEST"'", "size": '"$EXPANDED_SIZE"'}]' \ - "${MANIFEST_FILE}") > "${MANIFEST_FILE}" + "${MANIFEST_FILE}" > "${MANIFEST_FILE}.tmp" + mv "${MANIFEST_FILE}.tmp" "${MANIFEST_FILE}" # Clean up, in case we're dealing with large images rm "/tmp/oras-blob-fetch-${BLOB_DIGEST}" fi - done <<< $(jq -c '.layers[]' "${MANIFEST_FILE}") + done <<< "$(jq -c '.layers[]' "${MANIFEST_FILE}")" PYXIS_CERT_PATH=/tmp/crt PYXIS_KEY_PATH=/tmp/key create_container_image \ --pyxis-url $PYXIS_URL \