worker: pass build environment to osbuild
Detect it from the host using the distro package.
This commit is contained in:
parent
85e6182bdc
commit
5dad3bfc8e
6 changed files with 48 additions and 6 deletions
|
|
@ -31,6 +31,9 @@ type Distro interface {
|
|||
// output format with all packages and customizations specified in the
|
||||
// given blueprint.
|
||||
Pipeline(b *blueprint.Blueprint, outputFormat string) (*pipeline.Pipeline, error)
|
||||
|
||||
// Returns a osbuild runner that can be used on this distro.
|
||||
Runner() string
|
||||
}
|
||||
|
||||
var registered map[string]Distro
|
||||
|
|
|
|||
|
|
@ -343,6 +343,10 @@ func (r *Fedora30) Pipeline(b *blueprint.Blueprint, outputFormat string) (*pipel
|
|||
return p, nil
|
||||
}
|
||||
|
||||
func (r *Fedora30) Runner() string {
|
||||
return "org.osbuild.fedora30"
|
||||
}
|
||||
|
||||
func (r *Fedora30) buildPipeline() *pipeline.Pipeline {
|
||||
packages := []string{
|
||||
"dnf",
|
||||
|
|
|
|||
|
|
@ -373,6 +373,10 @@ func (r *RHEL82) Pipeline(b *blueprint.Blueprint, outputFormat string) (*pipelin
|
|||
return p, nil
|
||||
}
|
||||
|
||||
func (r *RHEL82) Runner() string {
|
||||
return "org.osbuild.rhel82"
|
||||
}
|
||||
|
||||
func (r *RHEL82) buildPipeline() *pipeline.Pipeline {
|
||||
packages := []string{
|
||||
"dnf",
|
||||
|
|
|
|||
|
|
@ -36,3 +36,7 @@ func (d *TestDistro) FilenameFromType(outputFormat string) (string, string, erro
|
|||
func (d *TestDistro) Pipeline(b *blueprint.Blueprint, outputFormat string) (*pipeline.Pipeline, error) {
|
||||
return nil, errors.New("invalid output format: " + outputFormat)
|
||||
}
|
||||
|
||||
func (d *TestDistro) Runner() string {
|
||||
return "org.osbuild.test"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue