Worker/osbuild: include osbuild version in OSBuildJobResult
This will make it easier to reproduce image builds using the same tooling which was used by the worker. This change will enable to include the osbuild version in Koji build metadata. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
2b6570c36c
commit
cca362678b
2 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue