diff --git a/cmd/osbuild-worker/jobimpl-osbuild.go b/cmd/osbuild-worker/jobimpl-osbuild.go index 2e5d34d2c..13e669af5 100644 --- a/cmd/osbuild-worker/jobimpl-osbuild.go +++ b/cmd/osbuild-worker/jobimpl-osbuild.go @@ -341,6 +341,13 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error { } }() + osbuildVersion, err := osbuild.OSBuildVersion() + if err != nil { + osbuildJobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, "Error getting osbuild binary version", err) + return err + } + osbuildJobResult.OSBuildVersion = osbuildVersion + // Read the job specification var jobArgs worker.OSBuildJob err = job.Args(&jobArgs) diff --git a/internal/worker/json.go b/internal/worker/json.go index 32938c240..67642fa70 100644 --- a/internal/worker/json.go +++ b/internal/worker/json.go @@ -63,6 +63,8 @@ type OSBuildJobResult struct { // Boot mode supported by the image // (string representation of distro.BootMode values) ImageBootMode string `json:"image_boot_mode,omitempty"` + // Version of the osbuild binary used by the worker to build the image + OSBuildVersion string `json:"osbuild_version,omitempty"` JobResult }