llbutil

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultPathEnv is the default PATH to use.
	DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
)
View Source
var ErrNoSecretsClient = fmt.Errorf("no secrets client provided")

ErrNoSecretsClient occurs when the secrets client is referenced but was never provided

Functions

func Abs

func Abs(ctx context.Context, s llb.State, p string) (string, error)

Abs pre-pends the working dir to the given path, if the path is relative.

func CopyOp

func CopyOp(srcState llb.State, srcs []string, destState llb.State, dest string, allowWildcard bool, isDir bool, keepTs bool, chown string, opts ...llb.ConstraintsOpt) llb.State

CopyOp is a simplified llb copy operation.

func DefaultPlatform added in v0.4.2

func DefaultPlatform() specs.Platform

DefaultPlatform returns the default platform to use if none is specified.

func DockerTagSafe added in v0.4.3

func DockerTagSafe(tag string) string

DockerTagSafe turns a string into a safe Docker tag.

func NewSecretProvider added in v0.3.10

func NewSecretProvider(client secretsclient.Client, overrides map[string][]byte) session.Attachable

NewSecretProvider returns a new secrets provider

func PlatformToString added in v0.4.2

func PlatformToString(p *specs.Platform) string

PlatformToString turns a platform pointer into a string representation.

func PlatformWithDefault added in v0.4.3

func PlatformWithDefault(p *specs.Platform) specs.Platform

PlatformWithDefault returns the same platform provided if not nil, or the default platform otherwise.

func ResolvePlatform added in v0.4.3

func ResolvePlatform(p1 *specs.Platform, p2 *specs.Platform) (*specs.Platform, error)

ResolvePlatform returns the non-nil platform provided. If both are nil, nil is returned. If both are non-nil, they are compared to ensure they are identical. If they are not, an error is returned.

func ScratchWithPlatform added in v0.4.2

func ScratchWithPlatform() llb.State

ScratchWithPlatform is the scratch state with the default platform readily set.

func StateToRef added in v0.3.12

func StateToRef(ctx context.Context, gwClient gwclient.Client, state llb.State, platform *specs.Platform, cacheImports map[string]bool) (gwclient.Reference, error)

StateToRef takes an LLB state, solves it using gateway and returns the ref.

func WithDependency

func WithDependency(state llb.State, depState llb.State, stateStr, depStr string, opts ...llb.RunOption) llb.State

WithDependency creates a fake dependency between two states.

Types

This section is empty.

Jump to

Keyboard shortcuts

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