Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 coreos#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)
jlebon authored and dustymabe committed Nov 10, 2022
1 parent d7217bc commit 03d70ec
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
@@ -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)


0 comments on commit 03d70ec

Please sign in to comment.