worker: drop implicit upload to server based on OSBuildJob.ImageName

Weldr API already does not rely on this code and nothing else uses it.
Since the code has been used only on-premise, where we expect the
composer and workers to be always of the same version, there is no need
to keep backward compatibility in the worker.
This commit is contained in:
Tomas Hozza 2022-06-29 16:51:34 +02:00 committed by Tom Gundersen
parent 165a05ab43
commit 6a12ce1998

View file

@ -345,20 +345,6 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
}
exportPath := exports[0]
if osbuildJobResult.OSBuildOutput.Success && jobArgs.ImageName != "" {
var f *os.File
imagePath := path.Join(outputDirectory, exportPath, jobArgs.ImageName)
f, err = os.Open(imagePath)
if err != nil {
return err
}
err = job.UploadArtifact(jobArgs.ImageName, f)
if err != nil {
return err
}
f.Close()
}
for _, jobTarget := range jobArgs.Targets {
var targetResult *target.TargetResult
switch targetOptions := jobTarget.Options.(type) {