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:
parent
165a05ab43
commit
6a12ce1998
1 changed files with 0 additions and 14 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue