diff --git a/doc/configuration.rst b/doc/configuration.rst index 0ae95638..c0119d6d 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1607,8 +1607,23 @@ OSBuild Composer for building images * ``release`` -- release part of the final NVR. If neither this option nor the global ``osbuild_release`` is set, Koji will automatically generate a value. - * ``repo`` -- a list of repository URLs from which to consume packages for + * ``repo`` -- a list of repositories from which to consume packages for building the image. By default only the variant repository is used. + The list items may use one of the following formats: + + * String with just the repository URL. + + * Dictionary with the following keys: + + * ``baseurl`` -- URL of the repository. + * ``package_sets`` -- a list of package set names to use for this + repository. Package sets are an internal concept of Image Builder + and are used in image definitions. If specified, the repository is + used by Image Builder only for the pipeline with the same name. + For example, specifying the ``build`` package set name will make + the repository to be used only for the build environment in which + the image will be built. (optional) + * ``arches`` -- list of architectures for which to build the image. By default, the variant arches are used. This option can only restrict it, not add a new one. diff --git a/pungi/checks.py b/pungi/checks.py index 5d110c21..1b0bf201 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -1188,7 +1188,26 @@ def make_schema(): }, "arches": {"$ref": "#/definitions/list_of_strings"}, "release": {"type": "string"}, - "repo": {"$ref": "#/definitions/list_of_strings"}, + "repo": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "additionalProperties": False, + "required": ["baseurl"], + "properties": { + "baseurl": {"type": "string"}, + "package_sets": { + "type": "array", + "items": {"type": "string"}, + }, + }, + }, + {"type": "string"}, + ] + }, + }, "failable": {"$ref": "#/definitions/list_of_strings"}, "subvariant": {"type": "string"}, "ostree_url": {"type": "string"}, diff --git a/tests/test_osbuild_phase.py b/tests/test_osbuild_phase.py index e545a39e..a4c57817 100644 --- a/tests/test_osbuild_phase.py +++ b/tests/test_osbuild_phase.py @@ -251,7 +251,13 @@ class RunOSBuildThreadTest(helpers.PungiTestCase): "1", # version "15", # release "image-target", - [self.topdir + "/compose/Everything/$arch/os"], + [ + self.topdir + "/compose/Everything/$arch/os", + { + "baseurl": self.topdir + "/compose/Everything/$arch/os", + "package_sets": ["build"], + }, + ], ["x86_64"], ), 1, @@ -273,7 +279,13 @@ class RunOSBuildThreadTest(helpers.PungiTestCase): ["aarch64", "x86_64"], opts={ "release": "15", - "repo": [self.topdir + "/compose/Everything/$arch/os"], + "repo": [ + self.topdir + "/compose/Everything/$arch/os", + { + "baseurl": self.topdir + "/compose/Everything/$arch/os", + "package_sets": ["build"], + }, + ], }, ), mock.call.save_task_id(1234),