Documentation ¶
Index ¶
- func DiskUsage(buildersMap map[string]string, builderImage string, platformsToClean []string, ...) error
- func NewPkgInfo() pkgInfo
- func PruneBuilder(buildersMap map[string]string, builderImage string, platformsToClean []string, ...) error
- type BuildOpt
- func WithBuildArgs(args []string) BuildOpt
- func WithBuildBuilderImage(image string) BuildOpt
- func WithBuildBuilderRestart(restart bool) BuildOpt
- func WithBuildBuilders(builders map[string]string) BuildOpt
- func WithBuildCacheDir(dir string) BuildOpt
- func WithBuildCacheProvider(c lktspec.CacheProvider) BuildOpt
- func WithBuildDocker(runner dockerRunner) BuildOpt
- func WithBuildForce() BuildOpt
- func WithBuildIgnoreCache() BuildOpt
- func WithBuildManifest() BuildOpt
- func WithBuildOutputWriter(w io.Writer) BuildOpt
- func WithBuildPlatforms(platforms ...imagespec.Platform) BuildOpt
- func WithBuildPull() BuildOpt
- func WithBuildPush() BuildOpt
- func WithBuildSbomScanner(scanner string) BuildOpt
- func WithBuildSkip() BuildOpt
- func WithBuildTargetDockerCache() BuildOpt
- func WithDockerfile(dockerfile string) BuildOpt
- func WithProgress(progress string) BuildOpt
- func WithRelease(r string) BuildOpt
- type Pkg
- func (p Pkg) Arches() []string
- func (p Pkg) Build(bos ...BuildOpt) error
- func (p Pkg) FullTag() string
- func (p Pkg) Hash() string
- func (p Pkg) Image() string
- func (p Pkg) Index(bos ...BuildOpt) error
- func (p Pkg) ReleaseTag(release string) (string, error)
- func (p Pkg) Tag() string
- func (p Pkg) TrustEnabled() bool
- type PkglibConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildOpt ¶
type BuildOpt func(bo *buildOpts) error
BuildOpt allows callers to specify options to Build
func WithBuildArgs ¶
WithBuildArgs add build args to use when building the package
func WithBuildBuilderImage ¶
WithBuildBuilderImage set the builder container image to use.
func WithBuildBuilderRestart ¶
WithBuildBuilderRestart restart the builder container even if it already is running with the correct image version
func WithBuildBuilders ¶
WithBuildBuilders which builders, as named contexts per platform, to use
func WithBuildCacheDir ¶
WithBuildCacheDir provide a build cache directory to use
func WithBuildCacheProvider ¶
func WithBuildCacheProvider(c lktspec.CacheProvider) BuildOpt
WithBuildCacheProvider provides a cacheProvider to use. If nil, defaults to the one shipped with linuxkit
func WithBuildDocker ¶
func WithBuildDocker(runner dockerRunner) BuildOpt
WithBuildDocker provides a docker runner to use. If nil, defaults to the current platform
func WithBuildForce ¶
func WithBuildForce() BuildOpt
WithBuildForce forces a build even if an image already exists
func WithBuildIgnoreCache ¶
func WithBuildIgnoreCache() BuildOpt
WithBuildIgnoreCache when building an image, do not look in local cache for dependent images
func WithBuildManifest ¶
func WithBuildManifest() BuildOpt
WithBuildManifest creates a multi-arch manifest for the image
func WithBuildOutputWriter ¶
WithBuildOutputWriter set the output writer for messages. If nil, defaults to stdout
func WithBuildPlatforms ¶
WithBuildPlatforms which platforms to build for
func WithBuildPull ¶
func WithBuildPull() BuildOpt
WithBuildPull pull down the image to cache if it already exists in registry
func WithBuildPush ¶
func WithBuildPush() BuildOpt
WithBuildPush pushes the result of the build to the registry
func WithBuildSbomScanner ¶
WithBuildSbomScanner when building an image, scan using the provided scanner image; if blank, uses the default
func WithBuildSkip ¶
func WithBuildSkip() BuildOpt
WithBuildSkip skips the actual build and only pushes/releases (if configured)
func WithBuildTargetDockerCache ¶
func WithBuildTargetDockerCache() BuildOpt
WithBuildTargetDockerCache put the build target in the docker cache instead of the default linuxkit cache
func WithDockerfile ¶
WithDockerfile which dockerfile to use when building the package
func WithProgress ¶
WithProgress which progress type to show
func WithRelease ¶
WithRelease releases as the given version after push
type Pkg ¶
type Pkg struct {
// contains filtered or unexported fields
}
Pkg encapsulates information about a package's source
func NewFromConfig ¶
func NewFromConfig(cfg PkglibConfig, args ...string) ([]Pkg, error)
NewFromConfig creates a range of Pkg from a PkglibConfig and paths to packages.
func (Pkg) Index ¶
Index create an index for the package tag based on all arch-specific tags in the registry.
func (Pkg) ReleaseTag ¶
ReleaseTag returns the tag to use for a particular release of the package
func (Pkg) TrustEnabled ¶
TrustEnabled returns true if trust is enabled
type PkglibConfig ¶
type PkglibConfig struct { DisableCache *bool Network *bool Org *string BuildYML string Hash string HashCommit string HashPath string Dirty bool Dev bool Tag string // Tag is a text/template string, defaults to {{.Hash}} }
PkglibConfig contains the configuration for the pkglib package. It is used to override the default behaviour of the package. Fields that are pointers are so that the caller can leave it as nil for "use whatever default pkglib has", while non-nil means "explicitly override".