diff --git a/cmd/osbuild-worker/jobimpl-koji-finalize.go b/cmd/osbuild-worker/jobimpl-koji-finalize.go index a63edf00f..e75ca712a 100644 --- a/cmd/osbuild-worker/jobimpl-koji-finalize.go +++ b/cmd/osbuild-worker/jobimpl-koji-finalize.go @@ -208,8 +208,8 @@ func (impl *KojiFinalizeJobImpl) Run(job worker.Job) error { // If there are any non-Koji target results in the build, // add them to the image output extra metadata. nonKojiTargetResults := buildResult.TargetResultsFilterByName([]target.TargetName{target.TargetNameKoji}) - if len(nonKojiTargetResults) > 0 { - imgOutputExtraInfo.UploadTargetResults = nonKojiTargetResults + for _, result := range nonKojiTargetResults { + imgOutputExtraInfo.UploadTargetResults = append(imgOutputExtraInfo.UploadTargetResults, result) } imgOutputsExtraInfo[imageFilename] = imgOutputExtraInfo diff --git a/internal/upload/koji/metadata.go b/internal/upload/koji/metadata.go index 55b5b973f..8f947fbe5 100644 --- a/internal/upload/koji/metadata.go +++ b/internal/upload/koji/metadata.go @@ -98,8 +98,9 @@ type ImageExtraInfo struct { // Version of the osbuild binary used by the worker to build the image OSBuildVersion string `json:"osbuild_version,omitempty"` // Results from any upload targets associated with the image - // except for the Koji target. - UploadTargetResults []*target.TargetResult `json:"upload_target_results,omitempty"` + // The structure of the data does not need to be known by the consumer, + // it is just a list of JSON objects. + UploadTargetResults []interface{} `json:"upload_target_results,omitempty"` } func (ImageExtraInfo) isImageOutputTypeMD() {}