Skip to content

Commit bfbb352

Browse files
committed
cmd-push-container-manifest: change image key schema
The `oscontainer` and `base-oscontainer` keys should follow the same schema. Currently, the former has a `digest` field, while the other one does not. Tweak `cosa push-container-manifest` and `cosa push-container` so that they follows the new schema. (Though note the latter command will be deleted soon). To keep previous 4.12 `meta.json` files valid, this loosens the `image` schema definition so that `digest` is now optional. Once we branch for 4.12, we will undo this change so that it becomes required again. Fixes #3122 (cherry picked from commit 738cb39) jlebon: I skipped backporting the changes to the schema since we don't need to be as flexible for 4.11. I also skipped the similar change to `cmd-push-container` since we're not planning to use that at all in the new pipeline. (cherry picked from commit b5a3842)
1 parent eb03fc6 commit bfbb352

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cmd-push-container-manifest

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ def main():
6868

6969
# Update the meta.json in each build/arch metadata
7070
for _, buildmeta in buildmetas.items():
71-
buildmeta[args.metajsonname] = {'image': f"{args.repo}@{digest}"}
71+
buildmeta[args.metajsonname] = {
72+
'image': args.repo,
73+
'digest': digest
74+
}
7275
buildmeta.write(artifact_name=args.metajsonname)
7376

7477

0 commit comments

Comments
 (0)