From 5fd5cedd0898a1cfd82ff140bfcd4994e6ccd2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 1 Aug 2023 13:39:17 +0200 Subject: [PATCH] OSBuildJob: add image boot mode to options and result MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/worker/json.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/worker/json.go b/internal/worker/json.go index 04824d0ff..ae8305f52 100644 --- a/internal/worker/json.go +++ b/internal/worker/json.go @@ -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 }