rhel85: tar image type
Traditional tar image type. Pipelines generation function for tar image type uses the same pipelines and stages as the tar installer, but exports the OS image directly.
This commit is contained in:
parent
ec381fefb9
commit
38f5b23e87
3 changed files with 41 additions and 4 deletions
|
|
@ -552,6 +552,20 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
Exclude: nil,
|
||||
}
|
||||
|
||||
tarImgType := imageType{
|
||||
name: "tar",
|
||||
filename: "root.tar.xz",
|
||||
mimeType: "application/x-tar",
|
||||
packageSets: map[string]rpmmd.PackageSet{
|
||||
"build": baseBuildPkgSet,
|
||||
"packages": {
|
||||
Include: []string{"policycoreutils", "selinux-policy-targeted"},
|
||||
Exclude: []string{"rng-tools"},
|
||||
},
|
||||
},
|
||||
pipelines: tarPipelines,
|
||||
exports: []string{"root-tar"},
|
||||
}
|
||||
tarInstallerImgTypeX86_64 := imageType{
|
||||
name: "tar-installer",
|
||||
filename: "installer.iso",
|
||||
|
|
@ -569,7 +583,6 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
pipelines: tarInstallerPipelines,
|
||||
exports: []string{"bootiso"},
|
||||
}
|
||||
x86_64.addImageTypes(tarInstallerImgTypeX86_64, edgeCommitImgTypeX86_64, edgeInstallerImgTypeX86_64, edgeOCIImgTypeX86_64)
|
||||
|
||||
edgeCommitImgTypeAarch64 := imageType{
|
||||
name: "edge-commit",
|
||||
|
|
@ -613,19 +626,23 @@ func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
|
|||
pipelines: edgeInstallerPipelines,
|
||||
exports: []string{"bootiso"},
|
||||
}
|
||||
x86_64.addImageTypes(tarImgType, tarInstallerImgTypeX86_64, edgeCommitImgTypeX86_64, edgeInstallerImgTypeX86_64, edgeOCIImgTypeX86_64)
|
||||
aarch64 := architecture{
|
||||
name: "aarch64",
|
||||
distro: rd,
|
||||
}
|
||||
aarch64.addImageTypes(edgeCommitImgTypeAarch64, edgeOCIImgTypeAarch64, edgeInstallerImgTypeAarch64)
|
||||
aarch64.addImageTypes(tarImgType, edgeCommitImgTypeAarch64, edgeOCIImgTypeAarch64, edgeInstallerImgTypeAarch64)
|
||||
|
||||
ppc64le := architecture{
|
||||
distro: rd,
|
||||
name: "ppc64le",
|
||||
}
|
||||
ppc64le.addImageTypes(tarImgType)
|
||||
s390x := architecture{
|
||||
distro: rd,
|
||||
name: "s390x",
|
||||
}
|
||||
s390x.addImageTypes(tarImgType)
|
||||
rd.addArches(x86_64, aarch64, ppc64le, s390x)
|
||||
return rd
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
|||
"edge-commit",
|
||||
"edge-container",
|
||||
"edge-installer",
|
||||
"tar",
|
||||
"tar-installer",
|
||||
},
|
||||
},
|
||||
|
|
@ -236,15 +237,16 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
|||
"edge-commit",
|
||||
"edge-container",
|
||||
"edge-installer",
|
||||
"tar",
|
||||
},
|
||||
},
|
||||
{
|
||||
arch: "ppc64le",
|
||||
imgNames: []string{},
|
||||
imgNames: []string{"tar"},
|
||||
},
|
||||
{
|
||||
arch: "s390x",
|
||||
imgNames: []string{},
|
||||
imgNames: []string{"tar"},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,24 @@ import (
|
|||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||
)
|
||||
|
||||
func tarPipelines(t *imageType, customizations *blueprint.Customizations, options distro.ImageOptions, repos []rpmmd.RepoConfig, packageSetSpecs map[string][]rpmmd.PackageSpec, rng *rand.Rand) ([]osbuild.Pipeline, error) {
|
||||
pipelines := make([]osbuild.Pipeline, 0)
|
||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs["build"]))
|
||||
|
||||
treePipeline, err := osPipeline(repos, packageSetSpecs["packages"], customizations, options, t.enabledServices, t.disabledServices, t.defaultTarget)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pipelines = append(pipelines, *treePipeline)
|
||||
tarPipeline := osbuild.Pipeline{
|
||||
Name: "root-tar",
|
||||
Build: "name:build",
|
||||
}
|
||||
tarPipeline.AddStage(tarStage("os", "root.tar.xz"))
|
||||
pipelines = append(pipelines, tarPipeline)
|
||||
return pipelines, nil
|
||||
}
|
||||
|
||||
func edgeInstallerPipelines(t *imageType, customizations *blueprint.Customizations, options distro.ImageOptions, repos []rpmmd.RepoConfig, packageSetSpecs map[string][]rpmmd.PackageSpec, rng *rand.Rand) ([]osbuild.Pipeline, error) {
|
||||
pipelines := make([]osbuild.Pipeline, 0)
|
||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs["build"]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue