From ef6d40dce49939224f8fa05ab9a85a3a95806f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Wed, 23 Nov 2022 11:53:33 +0100 Subject: [PATCH] osbuild: update schema and config documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `koji-osbuild` Hub schema has been relaxed a bit in the latest release (v11). Adjust the schema in Pungi to reflect changes in `koji-osbuild`. For more information on the changes in `koji-osbuild`, see: https://github.com/osbuild/koji-osbuild/pull/108 Signed-off-by: Tomáš Hozza --- doc/configuration.rst | 4 ++-- pungi/checks.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 907f72f4..0ae95638 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1641,13 +1641,13 @@ OSBuild Composer for building images * ``tenant_id`` -- Azure tenant ID to upload the image to * ``subscription_id`` -- Azure subscription ID to upload the image to * ``resource_group`` -- Azure resource group to upload the image to - * ``location`` -- Azure location to upload the image to + * ``location`` -- Azure location of the resource group (optional) * ``image_name`` -- Image name of the uploaded Azure image (optional) * **GCP upload options** -- upload to Google Cloud Platform. * ``region`` -- GCP region to upload the image to - * ``bucket`` -- GCP bucket to upload the image to + * ``bucket`` -- GCP bucket to upload the image to (optional) * ``share_with_accounts`` -- list of GCP accounts to share the image with * ``image_name`` -- Image name of the uploaded GCP image (optional) diff --git a/pungi/checks.py b/pungi/checks.py index a7f29606..5d110c21 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -1195,7 +1195,10 @@ def make_schema(): "ostree_ref": {"type": "string"}, "ostree_parent": {"type": "string"}, "upload_options": { - "oneOf": [ + # this should be really 'oneOf', but the minimal + # required properties in AWSEC2 and GCP options + # overlap. + "anyOf": [ # AWSEC2UploadOptions { "type": "object", @@ -1234,7 +1237,6 @@ def make_schema(): "tenant_id", "subscription_id", "resource_group", - "location", ], "properties": { "tenant_id": {"type": "string"}, @@ -1250,7 +1252,7 @@ def make_schema(): { "type": "object", "additionalProperties": False, - "required": ["region", "bucket"], + "required": ["region"], "properties": { "region": {"type": "string"}, "bucket": {"type": "string"},