The uploading of artifacts back to the worker server for the on-premise (Weldr) use case was signaled to the worker by setting the `ImageName` in the `OSBuildJob` definition. The code also relies on the osbuild exports being specified in the `OSBuildJob`, instead of in the target (this is not implemented yet). Prepare the ground for moving osbuild export definition from `OSBuildJob` to `Target` by introducing an explicit `Worker Server" upload target. This target will signal to the worker that it should upload the image back to the worker server. The new target is not yet used by any API implementation. Extend the worker osbuild job implementation to handle the new upload target.
15 lines
403 B
Go
15 lines
403 B
Go
package target
|
|
|
|
const TargetNameWorkerServer TargetName = "org.osbuild.worker.server"
|
|
|
|
type WorkerServerTargetOptions struct{}
|
|
|
|
func (WorkerServerTargetOptions) isTargetOptions() {}
|
|
|
|
func NewWorkerServerTarget() *Target {
|
|
return newTarget(TargetNameWorkerServer, &WorkerServerTargetOptions{})
|
|
}
|
|
|
|
func NewWorkerServerTargetResult() *TargetResult {
|
|
return newTargetResult(TargetNameWorkerServer, nil)
|
|
}
|