Documentation
¶
Overview ¶
Package assemble builds a Cargoship package on disk
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssembleDistro ¶
func AssembleDistro(ctx context.Context, d distro.Distro, distroPath string, opts AssembleOptions) (*layout.DistroLayout, error)
AssembleDistro creates the actual tarballs
Types ¶
type AssembleOptions ¶
type AssembleOptions struct {
RegistryOverrides []images.RegistryOverride
// FileOverrides redirect the file downloads a distro definition declares to an internal
// mirror or to a directory of pre-staged assets, the way RegistryOverrides redirects image
// pulls. See pkg/fileoverride.
FileOverrides []fileoverride.Override
// ContentStore is an opened local content bundle that images and files are resolved from
// before the network. It is nil when no store was given.
ContentStore ContentStore
OCIConcurrency int
CachePath string
SkipSBOM bool
// Reproducible pins Build.Timestamp to config.Timestamp instead of the
// current time, and is recorded on Build.Reproducible, so identical package
// inputs produce byte-identical output.
Reproducible bool
// SigningKeyPath and SigningKeyPassword sign the package as part of assembly when
// set. Empty values are a no-op -- see DistroLayout.SignPackage.
SigningKeyPath string
SigningKeyPassword string
types.RemoteOptions
}
AssembleOptions options
type ContentStore ¶ added in v0.39.0
type ContentStore interface {
images.ImageSource
// File reports whether the bundle holds the file the definition named as src, and the
// name it is restored under.
File(src string) (name string, ok bool)
// Fetch writes that file to dst.
Fetch(ctx context.Context, src, dst string) error
// Source names the bundle as the operator spelled it, for messages and provenance.
Source() string
}
ContentStore is a local, already-populated bundle of images and files that a build resolves against before reaching the network: a hauler store, a zarf package.
The image half is images.ImageSource unchanged, so pkg/images needs to know nothing about any particular bundle. The file half is declared here, at the consumer, and deliberately hands back a name and bytes rather than an OCI descriptor -- a hauler store holds a file as a titled layer, a zarf package holds it as a member of a component tarball, and only one of those has a descriptor to give.
A reader must never be placed in this field as a typed nil pointer, which is not itself nil and would send every lookup to a bundle that is not there. See openContentStore in pkg/distro.