Skip to content

Commit

Permalink
Modify index munge for verification
Browse files Browse the repository at this point in the history
Preserves the image.ref.name annotatoon and set it to the first arch tag
  • Loading branch information
LaurentGoderre committed Sep 13, 2024
1 parent c394a5a commit e691589
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions meta.jq
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,13 @@ def build_command:
# munge the index to what crane wants ("Error: layout contains 5 entries, consider --index")
@sh "jq \("
.manifests |= (
del(.[].annotations)
| unique
unique_by([ .digest, .size, .mediaType ])
| if length != 1 then
error(\"unexpected number of manifests: \" + length)
error("unexpected number of manifests: " + length)
else . end
| .[0].annotations += {
"org.opencontainers.image.ref.name": "docker.io/\(first(.source.arches[.build.arch].archTags[0])"
}
)
" | unindent_and_decomment_jq(3)) temp/index.json > temp/index.json.new",
"mv temp/index.json.new temp/index.json",
Expand Down

0 comments on commit e691589

Please sign in to comment.