image: complete OSTreeRawImage.InstantiateManifest()

Create all the necessary pipelines for the OSTreeRawImage and return the
artifact from the XZ pipeline.

Co-Authored-By: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Achilleas Koutsou 2022-08-16 21:13:16 +02:00 committed by Tom Gundersen
parent f39b3bf6d3
commit 74a196e427

View file

@ -38,5 +38,18 @@ func (img *OSTreeRawImage) InstantiateManifest(m *manifest.Manifest,
repos []rpmmd.RepoConfig,
runner runner.Runner,
rng *rand.Rand) (*artifact.Artifact, error) {
return nil, nil
buildPipeline := manifest.NewBuild(m, runner, repos)
buildPipeline.Checkpoint()
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)
xzPipeline := manifest.NewXZ(m, buildPipeline, imagePipeline)
xzPipeline.Filename = img.Filename
art := xzPipeline.Export()
return art, nil
}