image

package
v1.2.287 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 35 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

	ForceTargetPlatformLogging bool
}

type Conveyor

type Conveyor interface {
	stage.Conveyor

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

	GetForcedTargetPlatforms() []string
	GetTargetPlatforms() ([]string, error)
	GetImageTargetPlatforms(imageName string) ([]string, error)

	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
	TargetPlatform          string
	// contains filtered or unexported fields
}

func NewImage

func NewImage(ctx context.Context, targetPlatform, 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) GetBaseImageRepoDigest added in v1.2.236

func (i *Image) GetBaseImageRepoDigest() 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) IsFinal added in v1.2.223

func (i *Image) IsFinal() bool

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) ShouldLogPlatform added in v1.2.220

func (i *Image) ShouldLogPlatform() bool

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, targetPlatform string, opts CommonImageOptions) (ImagesSets, error)

func MapStapelConfigToImagesSets

func MapStapelConfigToImagesSets(ctx context.Context, metaConfig *config.Meta, stapelImageConfig config.StapelImageInterface, targetPlatform string, 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) GetImagePlatformsByName added in v1.2.219

func (tree *ImagesTree) GetImagePlatformsByName(finalOnly bool) map[string][]string

func (*ImagesTree) GetImages

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

func (*ImagesTree) GetImagesByName added in v1.2.220

func (tree *ImagesTree) GetImagesByName(finalOnly bool) []util.Pair[string, []*Image]

func (*ImagesTree) GetImagesNames added in v1.2.232

func (tree *ImagesTree) GetImagesNames() (res []string)

func (*ImagesTree) GetImagesSets

func (tree *ImagesTree) GetImagesSets() ImagesSets

func (*ImagesTree) GetMultiplatformImage added in v1.2.220

func (tree *ImagesTree) GetMultiplatformImage(name string) *MultiplatformImage

func (*ImagesTree) GetMultiplatformImages added in v1.2.220

func (tree *ImagesTree) GetMultiplatformImages() []*MultiplatformImage

func (*ImagesTree) SetMultiplatformImage added in v1.2.220

func (tree *ImagesTree) SetMultiplatformImage(newImg *MultiplatformImage)

type ImagesTreeOptions

type ImagesTreeOptions struct {
	CommonImageOptions

	OnlyImages    []string
	WithoutImages bool
}

type MultiplatformImage added in v1.2.220

type MultiplatformImage struct {
	Name   string
	Images []*Image

	MultiplatformImageOptions
	// contains filtered or unexported fields
}

func NewMultiplatformImage added in v1.2.220

func NewMultiplatformImage(name string, images []*Image, storageManager manager.StorageManagerInterface, opts MultiplatformImageOptions) *MultiplatformImage

func (*MultiplatformImage) GetDigest added in v1.2.220

func (img *MultiplatformImage) GetDigest() string

func (*MultiplatformImage) GetFinalStageDescription added in v1.2.220

func (img *MultiplatformImage) GetFinalStageDescription() *image.StageDescription

func (*MultiplatformImage) GetImagesInfoList added in v1.2.220

func (img *MultiplatformImage) GetImagesInfoList() []*common_image.Info

func (*MultiplatformImage) GetPlatforms added in v1.2.220

func (img *MultiplatformImage) GetPlatforms() []string

func (*MultiplatformImage) GetStageDescription added in v1.2.220

func (img *MultiplatformImage) GetStageDescription() *image.StageDescription

func (*MultiplatformImage) GetStageID added in v1.2.220

func (img *MultiplatformImage) GetStageID() common_image.StageID

func (*MultiplatformImage) IsFinal added in v1.2.223

func (img *MultiplatformImage) IsFinal() bool

func (*MultiplatformImage) SetFinalStageDescription added in v1.2.220

func (img *MultiplatformImage) SetFinalStageDescription(desc *common_image.StageDescription)

func (*MultiplatformImage) SetStageDescription added in v1.2.220

func (img *MultiplatformImage) SetStageDescription(desc *common_image.StageDescription)

type MultiplatformImageOptions added in v1.2.220

type MultiplatformImageOptions struct {
	IsArtifact, IsDockerfileImage, IsDockerfileTargetStage bool
}

Jump to

Keyboard shortcuts

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