Documentation
¶
Index ¶
- func BuildImageConfig(ctx context.Context, sOpt dalec.SourceOpts, spec *dalec.Spec, ...) (*dalec.DockerImageSpec, error)
- func HandleContainer(c DistroConfig) gwclient.BuildFunc
- func HandlePackage(cfg DistroConfig) gwclient.BuildFunc
- func HandleSysext(c DistroConfig) gwclient.BuildFunc
- type DistroConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildImageConfig ¶
func HandleContainer ¶
func HandleContainer(c DistroConfig) gwclient.BuildFunc
func HandlePackage ¶
func HandlePackage(cfg DistroConfig) gwclient.BuildFunc
func HandleSysext ¶
func HandleSysext(c DistroConfig) gwclient.BuildFunc
Types ¶
type DistroConfig ¶
type DistroConfig interface {
// Validate does any distro or packaging-specific validation of a Dalec spec.
Validate(*dalec.Spec) error
// Worker returns the worker image for the particular distro
Worker(sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) llb.State
SysextWorker(sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) llb.State
// BuildPkg returns an llb.State containing the built package
// which the passed in spec describes. This should be composable with
// BuildContainer(), which can consume the returned state.
BuildPkg(ctx context.Context,
client gwclient.Client,
sOpt dalec.SourceOpts,
spec *dalec.Spec, targetKey string, opts ...llb.ConstraintsOpt) llb.State
// ExtractPkg consumes an llb.State containing the built package from the
// given *dalec.Spec, and extracts it in a scratch container, along with any
// dependencies listed under sysext. The package manager is not used, so no
// further dependency resolution is performed.
ExtractPkg(ctx context.Context, client gwclient.Client, sOpt dalec.SourceOpts,
spec *dalec.Spec, targetKey string,
pkgState llb.State, opts ...llb.ConstraintsOpt) llb.State
// BuildContainer consumes an llb.State containing the built package from the
// given *dalec.Spec, and installs it in a target container.
BuildContainer(ctx context.Context, client gwclient.Client, sOpt dalec.SourceOpts,
spec *dalec.Spec, targetKey string,
pkgState llb.State, opts ...llb.ConstraintsOpt) llb.State
// RunTests runts the tests specified in a dalec spec against a built container, which may be the target container.
// Some distros may need to pass in a separate worker before mounting the target container.
RunTests(ctx context.Context, client gwclient.Client, spec *dalec.Spec, sOpt dalec.SourceOpts, ctr llb.State,
targetKey string, opts ...llb.ConstraintsOpt) (gwclient.Reference, error)
}
Click to show internal directories.
Click to hide internal directories.