pack

package
v1.23.14 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const StatusCodeUndetectedNoError = 20

All buildpacks groups have failed to detect w/o error. See https://buildpacks.io/docs/concepts/components/lifecycle/detect/#exit-codes

Variables

View Source
var Version semver.Version = semver.MustParse("0.30.0")

Version is the minimum version of pack that we require (and the one we fetch when we fetch pack on behalf of a user).

Functions

This section is empty.

Types

type Cli

type Cli struct {
	// contains filtered or unexported fields
}

func NewCli

func NewCli(
	console input.Console,
	commandRunner exec.CommandRunner,
) *Cli

NewCli creates a new PackCli. The CLI is not yet installed; call EnsureInstalled before using methods that require the pack binary. azd manages its own copy of the pack CLI, stored in `$AZD_CONFIG_DIR/bin`. If pack is not present at this location, or if it is present but is older than the minimum supported version, it is downloaded.

func NewPackCliWithPath

func NewPackCliWithPath(
	commandRunner exec.CommandRunner,
	cliPath string,
) *Cli

func (*Cli) Build

func (cli *Cli) Build(
	ctx context.Context,
	cwd string,
	builder string,
	imageName string,
	environ []string,
	progressWriter io.Writer,
) error

func (*Cli) EnsureInstalled

func (cli *Cli) EnsureInstalled(ctx context.Context) error

EnsureInstalled checks if pack CLI is available and downloads/upgrades if needed. This is safe to call multiple times; successful installation is cached and failed attempts are retried. Should be called with a request-scoped context before first use.

type StatusCodeError

type StatusCodeError struct {
	Err error

	// See all available status codes https://buildpacks.io/docs/concepts/components/lifecycle/create/
	Code int
}

StatusCodeError is a status code error provided by pack CLI.

func (*StatusCodeError) Error

func (s *StatusCodeError) Error() string

func (*StatusCodeError) Unwrap

func (s *StatusCodeError) Unwrap() error

Jump to

Keyboard shortcuts

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