Skip to content

Commit

Permalink
coreos-meta-translator: add gcp cloud launchable to release.json
Browse files Browse the repository at this point in the history
Related: coreos/fedora-coreos-tracker#494
Signed-off-by: Allen Bai <[email protected]>
  • Loading branch information
Allen Bai committed Jun 18, 2020
1 parent f8a1d21 commit 40a6bbc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions coreos-meta-translator/trans.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ def artifact(i):
"image": ami_dict["hvm"]
}

# GCP specific additions
if input_.get("gcp", None) is not None:
arch_dict["media"]["gcp"] = arch_dict["media"].get("gcp", {})
arch_dict["media"]["gcp"]["image"] = arch_dict["media"]["gcp"].get("image", {})
arch_dict["media"]["gcp"]["image"].update(input_.get("gcp", {}))
arch_dict["media"]["gcp"]["image"]["name"] = arch_dict["media"]["gcp"]["image"].pop("image", None)
# remove the url as we haven't decided to expose that information publicly yet
arch_dict["media"]["gcp"]["image"].pop("url", None)

# metal specific additions
arch_dict["media"]["metal"] = arch_dict["media"].get("metal", {})
arch_dict["media"]["metal"]["artifacts"] = arch_dict["media"]["metal"].get("artifacts", {})
Expand Down

0 comments on commit 40a6bbc

Please sign in to comment.