manifest: add the platform configuration to the RawOSTreeImage

This commit is contained in:
Achilleas Koutsou 2022-08-17 19:34:26 +02:00 committed by Tom Gundersen
parent c38c7ad126
commit b85fe8109c
2 changed files with 5 additions and 1 deletions

View file

@ -44,7 +44,7 @@ func (img *OSTreeRawImage) InstantiateManifest(m *manifest.Manifest,
osPipeline := manifest.NewOSTreeDeployment(m, buildPipeline, img.OSTreeRef, img.OSTreeCommit, img.OSTreeURL, img.OSName, img.Remote, img.Platform)
osPipeline.PartitionTable = img.PartitionTable
imagePipeline := manifest.NewRawOStreeImage(m, buildPipeline, osPipeline)
imagePipeline := manifest.NewRawOStreeImage(m, buildPipeline, img.Platform, osPipeline)
xzPipeline := manifest.NewXZ(m, buildPipeline, imagePipeline)
xzPipeline.Filename = img.Filename

View file

@ -3,6 +3,7 @@ package manifest
import (
"github.com/osbuild/osbuild-composer/internal/artifact"
"github.com/osbuild/osbuild-composer/internal/osbuild"
"github.com/osbuild/osbuild-composer/internal/platform"
)
// A RawOSTreeImage represents a raw ostree image file which can be booted in a
@ -11,15 +12,18 @@ type RawOSTreeImage struct {
Base
treePipeline *OSTreeDeployment
Filename string
platform platform.Platform
}
func NewRawOStreeImage(m *Manifest,
buildPipeline *Build,
platform platform.Platform,
treePipeline *OSTreeDeployment) *RawOSTreeImage {
p := &RawOSTreeImage{
Base: NewBase(m, "image", buildPipeline),
treePipeline: treePipeline,
Filename: "disk.img",
platform: platform,
}
buildPipeline.addDependent(p)
if treePipeline.Base.manifest != m {