distro

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package distro is used for creating/deploying distro package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, distroPath string, output string, opts CreateOptions) (string, error)

Create used to create a distro package

func Load

func Load(ctx context.Context, source string, opts LoadOptions) (*layout.DistroLayout, error)

Load fetches, verifies, and loads a Zarf package from the specified source.

func Publish

Publish used to publish a distro package to an oci registry

func Pull

func Pull(ctx context.Context, source, destination string, opts PullOptions) (string, error)

Pull takes a source URL and destination directory, fetches the Cargoship Distro package from the given sources, and returns the path to the fetched package.

Types

type CreateOptions

type CreateOptions struct {
	OCIConcurrency int
	CachePath      string
	IsInteractive  bool
	// Architecture narrows a package that targets several architectures down to a single one.
	// A package that targets one architecture ignores it.
	Architecture string
	// 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
	RegistryOverrides []images.RegistryOverride
	// FileOverrides redirect the file downloads a distro definition declares to an internal
	// mirror or to a directory of pre-staged assets.
	FileOverrides []fileoverride.Override
	// SigningKeyPath and SigningKeyPassword sign the package as part of creation
	// when set. Empty values are a no-op -- see DistroLayout.SignPackage.
	SigningKeyPath     string
	SigningKeyPassword string
	// Tag overrides the package metadata version.
	Tag string
	types.RemoteOptions
}

CreateOptions are the optional parameters to create

type LoadOptions

type LoadOptions struct {
	Shasum       string
	Architecture string
	Output       string
	// number of layers to pull in parallel
	OCIConcurrency int
	// CachePath is used to cache layers from OCI package pulls
	CachePath         string
	VerifyBlobOptions *signing.VerifyBlobOptions
	// Only applicable to OCI + HTTP
	types.RemoteOptions
	// VerificationStrategy for explicit definition
	layout.VerificationStrategy
}

LoadOptions are the options for LoadDistro.

type PublishOptions

type PublishOptions struct {
	// OCIConcurrency configures the amount of layers to push in parallel
	OCIConcurrency int
	// Retries specifies the number of retries to use
	Retries int
	// SignBlobOptions holds all signing configuration. Use signing.DefaultSignBlobOptions() as a base.
	SignBlobOptions signing.SignBlobOptions
	CachePath       string
	IsInteractive   bool
	Registry        *registry.Reference
	types.RemoteOptions
	// Tag is an optional tag for the OCI reference separate from the package metadata.version
	Tag string
}

PublishOptions are the optional parameters to publish

type PullOptions

type PullOptions struct {
	// SHASum uniquely identifies a package based on its contents.
	SHASum string
	// Architecture is the package architecture.
	Architecture string
	// Deprecated: Use VerifyBlobOptions instead. PublicKeyPath validates the create-time signage of a package.
	PublicKeyPath string
	// VerifyBlobOptions configures package signature verification.
	VerifyBlobOptions *signing.VerifyBlobOptions
	// OCIConcurrency is the number of layers pulled in parallel
	OCIConcurrency int
	// CachePath is used to cache layers from OCI package pulls
	CachePath string
	types.RemoteOptions
	// VerificationStrategy for explicit definition
	layout.VerificationStrategy
}

PullOptions declares optional configuration for a Pull operation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL