build

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageLogProcessStyle added in v1.1.0

func ImageLogProcessStyle(isArtifact bool) *logboek.Style

func ImageLogTagStyle added in v1.1.0

func ImageLogTagStyle(isArtifact bool) *logboek.Style

Types

type BaseImageType added in v1.1.9

type BaseImageType string
const (
	ImageFromRegistryAsBaseImage BaseImageType = "ImageFromRegistryBaseImage"
	StageAsBaseImage             BaseImageType = "StageBaseImage"
)

type BasePhase added in v1.1.0

type BasePhase struct {
	Conveyor *Conveyor
}

type BuildAndPublishOptions

type BuildAndPublishOptions struct {
	BuildStagesOptions
	PublishImagesOptions

	DryRun bool
}

type BuildPhase added in v1.1.0

type BuildPhase struct {
	BasePhase
	BuildPhaseOptions

	StagesIterator              *StagesIterator
	ShouldAddManagedImageRecord bool
}

func NewBuildPhase added in v1.1.0

func NewBuildPhase(c *Conveyor, opts BuildPhaseOptions) *BuildPhase

func (*BuildPhase) AfterImageStages added in v1.1.0

func (phase *BuildPhase) AfterImageStages(img *Image) error

func (*BuildPhase) AfterImages added in v1.1.0

func (phase *BuildPhase) AfterImages() error

func (*BuildPhase) BeforeImageStages added in v1.1.0

func (phase *BuildPhase) BeforeImageStages(img *Image) error

func (*BuildPhase) BeforeImages added in v1.1.0

func (phase *BuildPhase) BeforeImages() error

func (*BuildPhase) ImageProcessingShouldBeStopped added in v1.1.0

func (phase *BuildPhase) ImageProcessingShouldBeStopped(img *Image) bool

func (*BuildPhase) Name added in v1.1.0

func (phase *BuildPhase) Name() string

func (*BuildPhase) OnImageStage added in v1.1.0

func (phase *BuildPhase) OnImageStage(img *Image, stg stage.Interface) error

type BuildPhaseOptions added in v1.1.0

type BuildPhaseOptions struct {
	ShouldBeBuiltMode bool
	ImageBuildOptions container_runtime.BuildOptions
	IntrospectOptions IntrospectOptions
}

type BuildStagesOptions

type BuildStagesOptions struct {
	ImageBuildOptions container_runtime.BuildOptions
	IntrospectOptions
}

type Conveyor

type Conveyor struct {
	ContainerRuntime container_runtime.ContainerRuntime

	ImagesRepo         storage.ImagesRepo
	StorageLockManager storage.LockManager
	StagesManager      *stages_manager.StagesManager
	// contains filtered or unexported fields
}

func NewConveyor

func NewConveyor(werfConfig *config.WerfConfig, imageNamesToProcess []string, projectDir, baseTmpDir, sshAuthSock string, containerRuntime container_runtime.ContainerRuntime, stagesManager *stages_manager.StagesManager, imagesRepo storage.ImagesRepo, storageLockManager storage.LockManager) *Conveyor

func (*Conveyor) AppendOnTerminateFunc added in v1.1.0

func (c *Conveyor) AppendOnTerminateFunc(f func() error)

func (*Conveyor) BuildAndPublish

func (c *Conveyor) BuildAndPublish(opts BuildAndPublishOptions) error

func (*Conveyor) BuildStages

func (c *Conveyor) BuildStages(opts BuildStagesOptions) error

func (*Conveyor) GetGitRepoCache

func (c *Conveyor) GetGitRepoCache(gitRepoName string) *stage.GitRepoCache

func (*Conveyor) GetImage

func (c *Conveyor) GetImage(name string) *Image

func (*Conveyor) GetImageContentSignature added in v1.1.9

func (c *Conveyor) GetImageContentSignature(imageName string) string

func (*Conveyor) GetImageIDForImageStage added in v1.1.9

func (c *Conveyor) GetImageIDForImageStage(imageName, stageName string) string

func (*Conveyor) GetImageIDForLastImageStage added in v1.1.9

func (c *Conveyor) GetImageIDForLastImageStage(imageName string) string

func (*Conveyor) GetImageInfoGetters added in v1.1.0

func (c *Conveyor) GetImageInfoGetters(configImages []*config.StapelImage, configImagesFromDockerfile []*config.ImageFromDockerfile, commonTag string, tagStrategy tag_strategy.TagStrategy, withoutRegistry bool) []images_manager.ImageInfoGetter

func (*Conveyor) GetImageNameForImageStage added in v1.1.9

func (c *Conveyor) GetImageNameForImageStage(imageName, stageName string) string

func (*Conveyor) GetImageNameForLastImageStage added in v1.1.9

func (c *Conveyor) GetImageNameForLastImageStage(imageName string) string

func (*Conveyor) GetImageStageContentSignature added in v1.1.9

func (c *Conveyor) GetImageStageContentSignature(imageName, stageName string) string

func (*Conveyor) GetImageTmpDir

func (c *Conveyor) GetImageTmpDir(imageName string) string

func (*Conveyor) GetImportServer added in v1.1.0

func (c *Conveyor) GetImportServer(imageName, stageName string) (import_server.ImportServer, error)

func (*Conveyor) GetLocalGitRepo added in v1.1.0

func (c *Conveyor) GetLocalGitRepo() *git_repo.Local

func (*Conveyor) GetOrCreateStageImage added in v1.1.0

func (c *Conveyor) GetOrCreateStageImage(fromImage *container_runtime.StageImage, name string) *container_runtime.StageImage

func (*Conveyor) GetStageImage

func (c *Conveyor) GetStageImage(name string) *container_runtime.StageImage

func (*Conveyor) PublishImages

func (c *Conveyor) PublishImages(opts PublishImagesOptions) error

func (*Conveyor) SetLocalGitRepo added in v1.1.0

func (c *Conveyor) SetLocalGitRepo(repo *git_repo.Local)

func (*Conveyor) SetStageImage added in v1.1.0

func (c *Conveyor) SetStageImage(stageImage *container_runtime.StageImage)

func (*Conveyor) ShouldBeBuilt

func (c *Conveyor) ShouldBeBuilt(opts ShouldBeBuiltOptions) error

func (*Conveyor) Terminate

func (c *Conveyor) Terminate() error

func (*Conveyor) UnsetStageImage added in v1.1.0

func (c *Conveyor) UnsetStageImage(name string)

type ConveyorWithRetryWrapper added in v1.1.10

type ConveyorWithRetryWrapper struct {
	WerfConfig          *config.WerfConfig
	ImageNamesToProcess []string
	ProjectDir          string
	BaseTmpDir          string
	SshAuthSock         string
	ContainerRuntime    container_runtime.ContainerRuntime
	StagesManager       *stages_manager.StagesManager
	ImagesRepo          storage.ImagesRepo
	StorageLockManager  storage.LockManager
}

func NewConveyorWithRetryWrapper added in v1.1.10

func NewConveyorWithRetryWrapper(werfConfig *config.WerfConfig, imageNamesToProcess []string, projectDir, baseTmpDir, sshAuthSock string, containerRuntime container_runtime.ContainerRuntime, stagesManager *stages_manager.StagesManager, imagesRepo storage.ImagesRepo, storageLockManager storage.LockManager) *ConveyorWithRetryWrapper

func (*ConveyorWithRetryWrapper) Terminate added in v1.1.10

func (wrapper *ConveyorWithRetryWrapper) Terminate() error

func (*ConveyorWithRetryWrapper) WithRetryBlock added in v1.1.10

func (wrapper *ConveyorWithRetryWrapper) WithRetryBlock(f func(c *Conveyor) error) error

type Image

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

func (*Image) FetchBaseImage added in v1.1.9

func (i *Image) FetchBaseImage(c *Conveyor) error

func (*Image) GetBaseImage

func (i *Image) GetBaseImage() *container_runtime.StageImage

func (*Image) GetContentSignature added in v1.1.9

func (i *Image) GetContentSignature() string

func (*Image) GetLastNonEmptyStage added in v1.1.0

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

func (*Image) GetLogName added in v1.1.0

func (i *Image) GetLogName() string

func (*Image) GetName

func (i *Image) GetName() string

func (*Image) GetStage

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

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 added in v1.1.0

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

func (*Image) LogTagStyle added in v1.1.0

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

func (*Image) SetContentSignature added in v1.1.9

func (i *Image) SetContentSignature(sig string)

func (*Image) SetLastNonEmptyStage added in v1.1.0

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

func (*Image) SetStages

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

func (*Image) SetupBaseImage

func (i *Image) SetupBaseImage(c *Conveyor)

type IntrospectOptions

type IntrospectOptions struct {
	Targets []IntrospectTarget
}

func (*IntrospectOptions) ImageStageShouldBeIntrospected

func (opts *IntrospectOptions) ImageStageShouldBeIntrospected(imageName, stageName string) bool

type IntrospectTarget

type IntrospectTarget struct {
	ImageName string
	StageName string
}

type Phase

type Phase interface {
	Name() string
	BeforeImages() error
	AfterImages() error
	BeforeImageStages(img *Image) error
	OnImageStage(img *Image, stg stage.Interface) error
	AfterImageStages(img *Image) error
	ImageProcessingShouldBeStopped(img *Image) bool
}

type PublishImagesOptions

type PublishImagesOptions struct {
	ImagesToPublish []string
	TagOptions

	PublishReportPath   string
	PublishReportFormat PublishReportFormat
}

type PublishImagesPhase

type PublishImagesPhase struct {
	BasePhase
	ImagesToPublish      []string
	TagsByScheme         map[tag_strategy.TagStrategy][]string
	TagByStagesSignature bool
	ImagesRepo           storage.ImagesRepo

	PublishReport       *PublishReport
	PublishReportPath   string
	PublishReportFormat PublishReportFormat
}

func NewPublishImagesPhase

func NewPublishImagesPhase(c *Conveyor, imagesRepo storage.ImagesRepo, opts PublishImagesOptions) *PublishImagesPhase

func (*PublishImagesPhase) AfterImageStages added in v1.1.0

func (phase *PublishImagesPhase) AfterImageStages(img *Image) error

func (*PublishImagesPhase) AfterImages added in v1.1.0

func (phase *PublishImagesPhase) AfterImages() error

func (*PublishImagesPhase) BeforeImageStages added in v1.1.0

func (phase *PublishImagesPhase) BeforeImageStages(img *Image) error

func (*PublishImagesPhase) BeforeImages added in v1.1.0

func (phase *PublishImagesPhase) BeforeImages() error

func (*PublishImagesPhase) ImageProcessingShouldBeStopped added in v1.1.0

func (phase *PublishImagesPhase) ImageProcessingShouldBeStopped(img *Image) bool

func (*PublishImagesPhase) Name added in v1.1.0

func (phase *PublishImagesPhase) Name() string

func (*PublishImagesPhase) OnImageStage added in v1.1.0

func (phase *PublishImagesPhase) OnImageStage(img *Image, stg stage.Interface) error

type PublishReport added in v1.1.18

type PublishReport struct {
	Images map[string]PublishReportImageRecord
}

type PublishReportFormat added in v1.1.18

type PublishReportFormat string
const (
	PublishReportJSON PublishReportFormat = "json"
)

type PublishReportImageRecord added in v1.1.18

type PublishReportImageRecord struct {
	WerfImageName string
	DockerRepo    string
	DockerTag     string
	DockerImageID string
}

type ShouldBeBuiltOptions added in v1.1.10

type ShouldBeBuiltOptions struct {
	FetchLastStage bool
}

type StagesIterator added in v1.1.9

type StagesIterator struct {
	Conveyor *Conveyor

	PrevStage                  stage.Interface
	PrevNonEmptyStage          stage.Interface
	PrevBuiltStage             stage.Interface
	PrevNonEmptyStageImageSize int64
}

func NewStagesIterator added in v1.1.9

func NewStagesIterator(conveyor *Conveyor) *StagesIterator

func (*StagesIterator) GetPrevBuiltImage added in v1.1.9

func (iterator *StagesIterator) GetPrevBuiltImage(img *Image, stg stage.Interface) container_runtime.ImageInterface

func (*StagesIterator) GetPrevImage added in v1.1.9

func (iterator *StagesIterator) GetPrevImage(img *Image, stg stage.Interface) container_runtime.ImageInterface

func (*StagesIterator) OnImageStage added in v1.1.9

func (iterator *StagesIterator) OnImageStage(img *Image, stg stage.Interface, onImageStageFunc func(img *Image, stg stage.Interface, isEmpty bool) error) error

type TagOptions

type TagOptions struct {
	CustomTags           []string
	TagsByGitTag         []string
	TagsByGitBranch      []string
	TagsByGitCommit      []string
	TagByStagesSignature bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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