job: pass manifest instead of pipeline to osbuild
This is not a behavioral change, as all distros currently use empty source objects. But when we move over to rpm-based pipelines, this will change. Make the same change to osbuild-pipeline, so these stay in sync. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
919c484c79
commit
571932db37
7 changed files with 31 additions and 29 deletions
|
|
@ -25,7 +25,7 @@ type ImageBuild struct {
|
|||
Distro common.Distribution `json:"distro"`
|
||||
QueueStatus common.ImageBuildState `json:"queue_status"`
|
||||
ImageType common.ImageType `json:"image_type"`
|
||||
Pipeline *osbuild.Pipeline `json:"pipeline"`
|
||||
Manifest *osbuild.Manifest `json:"manifest"`
|
||||
Targets []*target.Target `json:"targets"`
|
||||
JobCreated time.Time `json:"job_created"`
|
||||
JobStarted time.Time `json:"job_started"`
|
||||
|
|
@ -35,10 +35,10 @@ type ImageBuild struct {
|
|||
|
||||
// DeepCopy creates a copy of the ImageBuild structure
|
||||
func (ib *ImageBuild) DeepCopy() ImageBuild {
|
||||
var newPipelinePtr *osbuild.Pipeline = nil
|
||||
if ib.Pipeline != nil {
|
||||
pipelineCopy := *ib.Pipeline
|
||||
newPipelinePtr = &pipelineCopy
|
||||
var newManifestPtr *osbuild.Manifest = nil
|
||||
if ib.Manifest != nil {
|
||||
manifestCopy := *ib.Manifest
|
||||
newManifestPtr = &manifestCopy
|
||||
}
|
||||
var newTargets []*target.Target
|
||||
for _, t := range ib.Targets {
|
||||
|
|
@ -51,7 +51,7 @@ func (ib *ImageBuild) DeepCopy() ImageBuild {
|
|||
Distro: ib.Distro,
|
||||
QueueStatus: ib.QueueStatus,
|
||||
ImageType: ib.ImageType,
|
||||
Pipeline: newPipelinePtr,
|
||||
Manifest: newManifestPtr,
|
||||
Targets: newTargets,
|
||||
JobCreated: ib.JobCreated,
|
||||
JobStarted: ib.JobStarted,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue