split: replace internal packages with images library
Remove all the internal package that are now in the github.com/osbuild/images package and vendor it. A new function in internal/blueprint/ converts from an osbuild-composer blueprint to an images blueprint. This is necessary for keeping the blueprint implementation in both packages. In the future, the images package will change the blueprint (and most likely rename it) and it will only be part of the osbuild-composer internals and interface. The Convert() function will be responsible for converting the blueprint into the new configuration object.
This commit is contained in:
parent
d59199670f
commit
0e4a9e586f
446 changed files with 5690 additions and 13312 deletions
47
vendor/github.com/osbuild/images/pkg/image/archive.go
generated
vendored
Normal file
47
vendor/github.com/osbuild/images/pkg/image/archive.go
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
package image
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
|
||||
"github.com/osbuild/images/internal/environment"
|
||||
"github.com/osbuild/images/internal/workload"
|
||||
"github.com/osbuild/images/pkg/artifact"
|
||||
"github.com/osbuild/images/pkg/manifest"
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
"github.com/osbuild/images/pkg/runner"
|
||||
)
|
||||
|
||||
type Archive struct {
|
||||
Base
|
||||
Platform platform.Platform
|
||||
OSCustomizations manifest.OSCustomizations
|
||||
Environment environment.Environment
|
||||
Workload workload.Workload
|
||||
Filename string
|
||||
}
|
||||
|
||||
func NewArchive() *Archive {
|
||||
return &Archive{
|
||||
Base: NewBase("archive"),
|
||||
}
|
||||
}
|
||||
|
||||
func (img *Archive) InstantiateManifest(m *manifest.Manifest,
|
||||
repos []rpmmd.RepoConfig,
|
||||
runner runner.Runner,
|
||||
rng *rand.Rand) (*artifact.Artifact, error) {
|
||||
buildPipeline := manifest.NewBuild(m, runner, repos)
|
||||
buildPipeline.Checkpoint()
|
||||
|
||||
osPipeline := manifest.NewOS(m, buildPipeline, img.Platform, repos)
|
||||
osPipeline.OSCustomizations = img.OSCustomizations
|
||||
osPipeline.Environment = img.Environment
|
||||
osPipeline.Workload = img.Workload
|
||||
|
||||
tarPipeline := manifest.NewTar(m, buildPipeline, &osPipeline.Base, "archive")
|
||||
tarPipeline.Filename = img.Filename
|
||||
artifact := tarPipeline.Export()
|
||||
|
||||
return artifact, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue