OSBuildJob: add image boot mode to options and result

Add the information about the image boot mode to the OSBuildJob options
as well as to the OSBuildJobResult options. The intention is that the
worker will simply copy the value from the job options to job result,
so that the `KojiFinalize` job can then access this information and
upload it to Koji as extra metadata.

This information is required in Koji in order for Red Hat's SP tooling
to know how to import image to the cloud environment in case the boot
mode affects the import parameters.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2023-08-01 13:39:17 +02:00 committed by Ondřej Budai
parent af1c373407
commit 5fd5cedd08

View file

@ -22,6 +22,10 @@ type OSBuildJob struct {
ManifestDynArgsIdx *int `json:"manifest_dyn_args_idx,omitempty"`
Targets []*target.Target `json:"targets,omitempty"`
PipelineNames *PipelineNames `json:"pipeline_names,omitempty"`
// The ImageBootMode is just copied to the result by the worker, so that
// the value can be accessed job which depend on it.
// (string representation of distro.BootMode values)
ImageBootMode string `json:"image_boot_mode,omitempty"`
}
// OsbuildExports returns a slice of osbuild pipeline names, which should be
@ -54,6 +58,9 @@ type OSBuildJobResult struct {
HostOS string `json:"host_os"`
// Architecture of the worker which handled the job
Arch string `json:"arch"`
// Boot mode supported by the image
// (string representation of distro.BootMode values)
ImageBootMode string `json:"image_boot_mode,omitempty"`
JobResult
}