worker/osbuild: fix forgotten return when koji upload fails

The return statement was forgotten when the Koji target support was
added. As a result, a Job with a failed Koji upload would be reported
as successful, while at the same time having a `JobError` set.
This commit is contained in:
Tomas Hozza 2022-06-14 14:10:32 +02:00 committed by Achilleas Koutsou
parent af94d28b52
commit 15891e1e7f

View file

@ -759,6 +759,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
imageHash, imageSize, err := kojiAPI.Upload(file, options.UploadDirectory, options.Filename)
if err != nil {
osbuildJobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorUploadingImage, err.Error())
return nil
}
logWithId.Info("[Koji] 🎉 Image successfully uploaded")