debian-forge-composer/internal/blueprint/liveiso_output.go
Tom Gundersen b1688cda76 blueprint: add infrastructure for translating to blueprints
Each output type will have its own translator from a blueprint to
a pipeline.

In the future, we may also want to distinguish between different
base distributions and architectures, but for now we keep it
simple and hardcode to a given one.

Some placeholder output formats are added, these have not been
tested or reserached, but are included to show how the it will
all fit together.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-10-05 20:44:32 +02:00

24 lines
487 B
Go

package blueprint
import "osbuild-composer/internal/pipeline"
type liveIsoOutput struct{}
func (t *liveIsoOutput) translate(b *Blueprint) *pipeline.Pipeline {
p := &pipeline.Pipeline{}
p.SetAssembler(
pipeline.NewQEMUAssembler(
&pipeline.QEMUAssemblerOptions{
Format: "raw",
Filename: t.getName(),
}))
return p
}
func (t *liveIsoOutput) getName() string {
return "image.iso"
}
func (t *liveIsoOutput) getMime() string {
return "application/x-iso9660-image"
}