Skip to content

Commit

Permalink
cmd-push-container-manifest: change image key schema
Browse files Browse the repository at this point in the history
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)
(cherry picked from commit 2af1bd0)
  • Loading branch information
jlebon authored and dustymabe committed Nov 15, 2022
1 parent 194099d commit 2f9b04d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmd-push-container-manifest
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ def main():

# Update the meta.json in each build/arch metadata
for _, buildmeta in buildmetas.items():
buildmeta[args.metajsonname] = {'image': f"{args.repo}@{digest}"}
buildmeta[args.metajsonname] = {
'image': args.repo,
'digest': digest
}
buildmeta.write(artifact_name=args.metajsonname)


Expand Down

0 comments on commit 2f9b04d

Please sign in to comment.