osbuild: manifest type in config
Allow the manifest type used to be specified in the pungi configuration
instead of always selecting the manifest type based on the koji output.
Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
(cherry picked from commit f30a8b4d15
)
This commit is contained in:
parent
b0964ff555
commit
323d1c1eb6
@ -1652,6 +1652,8 @@ OSBuild Composer for building images
|
|||||||
* ``arches`` -- list of architectures for which to build the image. By
|
* ``arches`` -- list of architectures for which to build the image. By
|
||||||
default, the variant arches are used. This option can only restrict it,
|
default, the variant arches are used. This option can only restrict it,
|
||||||
not add a new one.
|
not add a new one.
|
||||||
|
* ``manifest_type`` -- the image type that is put into the manifest by
|
||||||
|
pungi. If not supplied then it is autodetected from the Koji output.
|
||||||
* ``ostree_url`` -- URL of the repository that's used to fetch the parent
|
* ``ostree_url`` -- URL of the repository that's used to fetch the parent
|
||||||
commit from.
|
commit from.
|
||||||
* ``ostree_ref`` -- name of the ostree branch
|
* ``ostree_ref`` -- name of the ostree branch
|
||||||
|
@ -1257,6 +1257,7 @@ def make_schema():
|
|||||||
"ostree_url": {"type": "string"},
|
"ostree_url": {"type": "string"},
|
||||||
"ostree_ref": {"type": "string"},
|
"ostree_ref": {"type": "string"},
|
||||||
"ostree_parent": {"type": "string"},
|
"ostree_parent": {"type": "string"},
|
||||||
|
"manifest_type": {"type": "string"},
|
||||||
"upload_options": {
|
"upload_options": {
|
||||||
# this should be really 'oneOf', but the minimal
|
# this should be really 'oneOf', but the minimal
|
||||||
# required properties in AWSEC2 and GCP options
|
# required properties in AWSEC2 and GCP options
|
||||||
|
@ -249,7 +249,14 @@ class RunOSBuildThread(WorkerThread):
|
|||||||
|
|
||||||
# Update image manifest
|
# Update image manifest
|
||||||
img = Image(compose.im)
|
img = Image(compose.im)
|
||||||
img.type = archive["type_name"] if archive["type_name"] != "iso" else "dvd"
|
|
||||||
|
# Get the manifest type from the config if supplied, otherwise we
|
||||||
|
# determine the manifest type based on the koji output
|
||||||
|
img.type = config.get(
|
||||||
|
"manifest_type",
|
||||||
|
archive["type_name"] if archive["type_name"] != "iso" else "dvd",
|
||||||
|
)
|
||||||
|
|
||||||
img.format = suffix
|
img.format = suffix
|
||||||
img.path = os.path.join(rel_image_dir, archive["filename"])
|
img.path = os.path.join(rel_image_dir, archive["filename"])
|
||||||
img.mtime = util.get_mtime(image_dest)
|
img.mtime = util.get_mtime(image_dest)
|
||||||
|
Loading…
Reference in New Issue
Block a user