image

package
v1.2.201 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvToMap added in v1.2.198

func EnvToMap(env []string) map[string]string

func ImageLogProcessStyle

func ImageLogProcessStyle(isArtifact bool) color.Style

func ImageLogTagStyle

func ImageLogTagStyle(isArtifact bool) color.Style

Types

type BaseImageType

type BaseImageType string
const (
	ImageFromRegistryAsBaseImage BaseImageType = "ImageFromRegistryAsBaseImage"
	StageAsBaseImage             BaseImageType = "StageAsBaseImage"
	NoBaseImage                  BaseImageType = "NoBaseImage"
)

type BuildContextArchive added in v1.2.182

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

func NewBuildContextArchive added in v1.2.182

func NewBuildContextArchive(giterminismMgr giterminism_manager.Interface, extractionRootTmpDir string) *BuildContextArchive

func (*BuildContextArchive) CalculateGlobsChecksum added in v1.2.185

func (a *BuildContextArchive) CalculateGlobsChecksum(ctx context.Context, globs []string, checkForArchives bool) (string, error)

func (*BuildContextArchive) CalculatePathsChecksum added in v1.2.185

func (a *BuildContextArchive) CalculatePathsChecksum(ctx context.Context, paths []string) (string, error)

func (*BuildContextArchive) CleanupExtractedDir added in v1.2.182

func (a *BuildContextArchive) CleanupExtractedDir(ctx context.Context)

func (*BuildContextArchive) Create added in v1.2.182

func (*BuildContextArchive) ExtractOrGetExtractedDir added in v1.2.182

func (a *BuildContextArchive) ExtractOrGetExtractedDir(ctx context.Context) (string, error)

func (*BuildContextArchive) Path added in v1.2.182

func (a *BuildContextArchive) Path() string

type CommonImageOptions

type CommonImageOptions struct {
	Conveyor           Conveyor
	GiterminismManager giterminism_manager.Interface
	ContainerBackend   container_backend.ContainerBackend
	StorageManager     manager.StorageManagerInterface
	ProjectDir         string
	ProjectName        string
	ContainerWerfDir   string
	TmpDir             string
}

type Conveyor

type Conveyor interface {
	stage.Conveyor

	GetImage(name string) *Image
	GetOrCreateStageImage(name string, prevStageImage *stage.StageImage, stg stage.Interface, img *Image) *stage.StageImage

	IsBaseImagesRepoIdsCacheExist(key string) bool
	GetBaseImagesRepoIdsCache(key string) string
	SetBaseImagesRepoIdsCache(key, value string)

	IsBaseImagesRepoErrCacheExist(key string) bool
	GetBaseImagesRepoErrCache(key string) error
	SetBaseImagesRepoErrCache(key string, err error)

	GetServiceRWMutex(service string) *sync.RWMutex

	SetRemoteGitRepo(key string, repo *git_repo.Remote)
	GetRemoteGitRepo(key string) *git_repo.Remote
}

type Image

type Image struct {
	CommonImageOptions

	IsArtifact              bool
	IsDockerfileImage       bool
	IsDockerfileTargetStage bool
	Name                    string
	DockerfileImageConfig   *config.ImageFromDockerfile
	// contains filtered or unexported fields
}

func NewImage

func NewImage(ctx context.Context, name string, baseImageType BaseImageType, opts ImageOptions) (*Image, error)

func (*Image) ExpandDependencies added in v1.2.198

func (i *Image) ExpandDependencies(ctx context.Context, baseEnv map[string]string) error

func (*Image) FetchBaseImage

func (i *Image) FetchBaseImage(ctx context.Context) error

func (*Image) GetBaseImageReference added in v1.2.178

func (i *Image) GetBaseImageReference() string

func (*Image) GetBaseStageImage added in v1.2.178

func (i *Image) GetBaseStageImage() *stage.StageImage

TODO(staged-dockerfile): this is only for compatibility with stapel-builder logic, and this should be unified with new staged-dockerfile logic

func (*Image) GetContentDigest

func (i *Image) GetContentDigest() string

func (*Image) GetLastNonEmptyStage

func (i *Image) GetLastNonEmptyStage() stage.Interface

func (*Image) GetLogName

func (i *Image) GetLogName() string

func (*Image) GetName

func (i *Image) GetName() string

func (*Image) GetRebuilt

func (i *Image) GetRebuilt() bool

func (*Image) GetStage

func (i *Image) GetStage(name stage.StageName) stage.Interface

func (*Image) GetStageID

func (i *Image) GetStageID() string

func (*Image) GetStages

func (i *Image) GetStages() []stage.Interface

func (*Image) LogDetailedName

func (i *Image) LogDetailedName() string

func (*Image) LogName

func (i *Image) LogName() string

func (*Image) LogProcessStyle

func (i *Image) LogProcessStyle() color.Style

func (*Image) LogTagStyle

func (i *Image) LogTagStyle() color.Style

func (*Image) SetContentDigest

func (i *Image) SetContentDigest(digest string)

func (*Image) SetLastNonEmptyStage

func (i *Image) SetLastNonEmptyStage(stg stage.Interface)

func (*Image) SetRebuilt

func (i *Image) SetRebuilt(rebuilt bool)

func (*Image) SetStages

func (i *Image) SetStages(stages []stage.Interface)

func (*Image) SetupBaseImage

func (i *Image) SetupBaseImage(ctx context.Context, storageManager manager.StorageManagerInterface, storageOpts manager.StorageOptions) error

func (*Image) UsesBuildContext added in v1.2.182

func (i *Image) UsesBuildContext() bool

type ImageOptions

type ImageOptions struct {
	CommonImageOptions
	IsArtifact, IsDockerfileImage, IsDockerfileTargetStage bool
	DockerfileImageConfig                                  *config.ImageFromDockerfile

	BaseImageReference        string
	BaseImageName             string
	FetchLatestBaseImage      bool
	DockerfileExpanderFactory dockerfile.ExpanderFactory
}

type ImagesSets

type ImagesSets [][]*Image

func MapDockerfileConfigToImagesSets

func MapDockerfileConfigToImagesSets(ctx context.Context, dockerfileImageConfig *config.ImageFromDockerfile, opts CommonImageOptions) (ImagesSets, error)

func MapStapelConfigToImagesSets

func MapStapelConfigToImagesSets(ctx context.Context, metaConfig *config.Meta, stapelImageConfig config.StapelImageInterface, opts CommonImageOptions) (ImagesSets, error)

type ImagesSetsBuilder

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

func NewImagesSetsBuilder

func NewImagesSetsBuilder() *ImagesSetsBuilder

func (*ImagesSetsBuilder) GetAllImages

func (is *ImagesSetsBuilder) GetAllImages() []*Image

func (*ImagesSetsBuilder) GetImagesSets

func (is *ImagesSetsBuilder) GetImagesSets() ImagesSets

func (*ImagesSetsBuilder) MergeImagesSets

func (is *ImagesSetsBuilder) MergeImagesSets(newImagesSets [][]*Image)

func (*ImagesSetsBuilder) Next

func (is *ImagesSetsBuilder) Next()

type ImagesTree

type ImagesTree struct {
	ImagesTreeOptions
	// contains filtered or unexported fields
}

func NewImagesTree

func NewImagesTree(werfConfig *config.WerfConfig, opts ImagesTreeOptions) *ImagesTree

func (*ImagesTree) Calculate

func (tree *ImagesTree) Calculate(ctx context.Context) error

func (*ImagesTree) GetImage

func (tree *ImagesTree) GetImage(name string) *Image

func (*ImagesTree) GetImages

func (tree *ImagesTree) GetImages() []*Image

func (*ImagesTree) GetImagesSets

func (tree *ImagesTree) GetImagesSets() ImagesSets

type ImagesTreeOptions

type ImagesTreeOptions struct {
	CommonImageOptions

	OnlyImages    []string
	WithoutImages bool
}

Jump to

Keyboard shortcuts

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