executor

package
v0.0.0-...-ced0851 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Overview

for use in tests

Index

Constants

View Source
const (
	UpstreamClientUaKey = "UPSTREAM_CLIENT_TYPE"
	DummyDestination    = "docker.io/unset-repo/unset-image-name"
)

Variables

View Source
var (
	DummyDestinations = []string{DummyDestination}
)

for testing

Functions

func CalculateDependencies

func CalculateDependencies(stages []config.KanikoStage, opts *config.KanikoOptions, stageNameToIdx map[string]string) (map[int][]string, error)

func CheckPushPermissions

func CheckPushPermissions(opts *config.KanikoOptions) error

CheckPushPermissions checks that the configured credentials can be used to push to every specified destination.

func DoBuild

func DoBuild(opts *config.KanikoOptions) (v1.Image, error)

DoBuild executes building the Dockerfile

func DoPush

func DoPush(image v1.Image, opts *config.KanikoOptions) error

DoPush is responsible for pushing image to the destinations specified in opts. A dummy destination would be set when --no-push is set to true and --tar-path is not empty with empty --destinations.

func ResolveCrossStageInstructions

func ResolveCrossStageInstructions(stages []config.KanikoStage) map[string]string

iterates over a list of KanikoStage and resolves instructions referring to earlier stages returns a mapping of stage name to stage id, f.e - ["first": "0", "second": "1", "target": "2"]

Types

type CompositeCache

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

CompositeCache is a type that generates a cache key from a series of keys.

func NewCompositeCache

func NewCompositeCache(initial ...string) *CompositeCache

NewCompositeCache returns an initialized composite cache object.

func (*CompositeCache) AddKey

func (s *CompositeCache) AddKey(k ...string)

AddKey adds the specified key to the sequence.

func (*CompositeCache) AddPath

func (s *CompositeCache) AddPath(p string, context util.FileContext) error

func (*CompositeCache) Hash

func (s *CompositeCache) Hash() (string, error)

Hash returns the composite key in a string SHA256 format.

func (*CompositeCache) Key

func (s *CompositeCache) Key() string

Key returns the human readable composite key as a string.

type MockCachedDockerCommand

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

func (MockCachedDockerCommand) CacheCommand

func (m MockCachedDockerCommand) CacheCommand(image v1.Image) commands.DockerCommand

func (MockCachedDockerCommand) ExecuteCommand

func (m MockCachedDockerCommand) ExecuteCommand(c *v1.Config, args *dockerfile.BuildArgs) error

func (MockCachedDockerCommand) FilesToSnapshot

func (m MockCachedDockerCommand) FilesToSnapshot() []string

func (MockCachedDockerCommand) FilesUsedFromContext

func (m MockCachedDockerCommand) FilesUsedFromContext(c *v1.Config, args *dockerfile.BuildArgs) ([]string, error)

func (MockCachedDockerCommand) IsArgsEnvsRequiredInCache

func (m MockCachedDockerCommand) IsArgsEnvsRequiredInCache() bool

func (MockCachedDockerCommand) MetadataOnly

func (m MockCachedDockerCommand) MetadataOnly() bool

func (MockCachedDockerCommand) ProvidesFilesToSnapshot

func (m MockCachedDockerCommand) ProvidesFilesToSnapshot() bool

func (MockCachedDockerCommand) RequiresUnpackedFS

func (m MockCachedDockerCommand) RequiresUnpackedFS() bool

func (MockCachedDockerCommand) ShouldCacheOutput

func (m MockCachedDockerCommand) ShouldCacheOutput() bool

func (MockCachedDockerCommand) ShouldDetectDeletedFiles

func (m MockCachedDockerCommand) ShouldDetectDeletedFiles() bool

func (MockCachedDockerCommand) String

func (m MockCachedDockerCommand) String() string

type MockDockerCommand

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

func (MockDockerCommand) CacheCommand

func (m MockDockerCommand) CacheCommand(image v1.Image) commands.DockerCommand

func (MockDockerCommand) ExecuteCommand

func (m MockDockerCommand) ExecuteCommand(c *v1.Config, args *dockerfile.BuildArgs) error

func (MockDockerCommand) FilesToSnapshot

func (m MockDockerCommand) FilesToSnapshot() []string

func (MockDockerCommand) FilesUsedFromContext

func (m MockDockerCommand) FilesUsedFromContext(c *v1.Config, args *dockerfile.BuildArgs) ([]string, error)

func (MockDockerCommand) IsArgsEnvsRequiredInCache

func (m MockDockerCommand) IsArgsEnvsRequiredInCache() bool

func (MockDockerCommand) MetadataOnly

func (m MockDockerCommand) MetadataOnly() bool

func (MockDockerCommand) ProvidesFilesToSnapshot

func (m MockDockerCommand) ProvidesFilesToSnapshot() bool

func (MockDockerCommand) RequiresUnpackedFS

func (m MockDockerCommand) RequiresUnpackedFS() bool

func (MockDockerCommand) ShouldCacheOutput

func (m MockDockerCommand) ShouldCacheOutput() bool

func (MockDockerCommand) ShouldDetectDeletedFiles

func (m MockDockerCommand) ShouldDetectDeletedFiles() bool

func (MockDockerCommand) String

func (m MockDockerCommand) String() string

Jump to

Keyboard shortcuts

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