build

package
v1.0.1-beta.15 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildCacheVersion = "1"

	LocalImageStageImageNameFormat = "werf-stages-storage/%s"
	LocalImageStageImageFormat     = "werf-stages-storage/%s:%s"
)
View Source
const RepoImageStageTagFormat = "image-stage-%s"

Variables

View Source
var (
	ErrConveyorShouldBeReset = errors.New("conveyor should be reset")
)

Functions

func ImageLogProcessColorizeFunc

func ImageLogProcessColorizeFunc(isArtifact bool) func(...interface{}) string

func ImageLogTagColorizeFunc

func ImageLogTagColorizeFunc(isArtifact bool) func(...interface{}) string

Types

type BuildAndPublishOptions

type BuildAndPublishOptions struct {
	BuildStagesOptions
	PublishImagesOptions
}

type BuildStagesOptions

type BuildStagesOptions struct {
	ImageBuildOptions imagePkg.BuildOptions
}

type BuildStagesPhase

type BuildStagesPhase struct {
	StagesRepo string
	BuildStagesOptions
}

func NewBuildStagesPhase

func NewBuildStagesPhase(stagesRepo string, opts BuildStagesOptions) *BuildStagesPhase

func (*BuildStagesPhase) Run

func (p *BuildStagesPhase) Run(c *Conveyor) (err error)

type Conveyor

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

func NewConveyor

func NewConveyor(werfConfig *config.WerfConfig, imageNamesToProcess []string, projectDir, baseTmpDir, sshAuthSock string) *Conveyor

func (*Conveyor) AcquireGlobalLock

func (c *Conveyor) AcquireGlobalLock(name string, opts lock.LockOptions) error

func (*Conveyor) BuildAndPublish

func (c *Conveyor) BuildAndPublish(stagesRepo, imagesRepo string, opts BuildAndPublishOptions) error

func (*Conveyor) BuildStages

func (c *Conveyor) BuildStages(stageRepo string, opts BuildStagesOptions) error

func (*Conveyor) GetBuildingGitStage

func (c *Conveyor) GetBuildingGitStage(imageName string) stage.StageName

func (*Conveyor) GetImage

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

func (*Conveyor) GetImageBySignature

func (c *Conveyor) GetImageBySignature(signature string) image.ImageInterface

func (*Conveyor) GetImageLatestStageImageName

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

func (*Conveyor) GetImageLatestStageSignature

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

func (*Conveyor) GetImageTmpDir

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

func (*Conveyor) GetOrCreateImage

func (c *Conveyor) GetOrCreateImage(fromImage *image.StageImage, name string) *image.StageImage

func (*Conveyor) GetStageImage

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

func (*Conveyor) PublishImages

func (c *Conveyor) PublishImages(imagesRepo string, opts PublishImagesOptions) error

func (*Conveyor) ReInitRuntimeFields

func (c *Conveyor) ReInitRuntimeFields()

func (*Conveyor) ReleaseAllGlobalLocks

func (c *Conveyor) ReleaseAllGlobalLocks() error

func (*Conveyor) ReleaseGlobalLock

func (c *Conveyor) ReleaseGlobalLock(name string) error

func (*Conveyor) SetBuildingGitStage

func (c *Conveyor) SetBuildingGitStage(imageName string, stageName stage.StageName)

func (*Conveyor) SetImageBySignature

func (c *Conveyor) SetImageBySignature(signature string, img image.ImageInterface)

func (*Conveyor) ShouldBeBuilt

func (c *Conveyor) ShouldBeBuilt() error

type Image

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

func (*Image) GetBaseImage

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

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) LatestStage

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

func (*Image) LogDetailedName

func (i *Image) LogDetailedName() string

func (*Image) LogName

func (i *Image) LogName() string

func (*Image) LogProcessColorizeFunc

func (i *Image) LogProcessColorizeFunc() func(...interface{}) string

func (*Image) LogTagColorizeFunc

func (i *Image) LogTagColorizeFunc() func(...interface{}) string

func (*Image) PrepareBaseImage

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

func (*Image) SetStages

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

func (*Image) SetupBaseImage

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

type InitializationPhase

type InitializationPhase struct{}

func NewInitializationPhase

func NewInitializationPhase() *InitializationPhase

func (*InitializationPhase) Run

func (p *InitializationPhase) Run(c *Conveyor) (err error)

type Phase

type Phase interface {
	Run(*Conveyor) error
}

type PrepareStagesPhase

type PrepareStagesPhase struct{}

func NewPrepareStagesPhase

func NewPrepareStagesPhase() *PrepareStagesPhase

func (*PrepareStagesPhase) Run

func (p *PrepareStagesPhase) Run(c *Conveyor) error

type PublishImagesOptions

type PublishImagesOptions struct {
	TagOptions
}

type PublishImagesPhase

type PublishImagesPhase struct {
	WithStages   bool
	ImagesRepo   string
	TagsByScheme map[tag_strategy.TagStrategy][]string
}

func NewPublishImagesPhase

func NewPublishImagesPhase(imagesRepo string, opts PublishImagesOptions) *PublishImagesPhase

func (*PublishImagesPhase) Run

func (p *PublishImagesPhase) Run(c *Conveyor) error

type RenewPhase

type RenewPhase struct{}

func NewRenewPhase

func NewRenewPhase() *RenewPhase

func (*RenewPhase) Run

func (p *RenewPhase) Run(c *Conveyor) error

type ShouldBeBuiltPhase

type ShouldBeBuiltPhase struct{}

func NewShouldBeBuiltPhase

func NewShouldBeBuiltPhase() *ShouldBeBuiltPhase

func (*ShouldBeBuiltPhase) Run

func (p *ShouldBeBuiltPhase) Run(c *Conveyor) error

type SignaturesPhase

type SignaturesPhase struct {
	LockImages bool
}

func NewSignaturesPhase

func NewSignaturesPhase(lockImages bool) *SignaturesPhase

func (*SignaturesPhase) Run

func (p *SignaturesPhase) Run(c *Conveyor) error

type TagOptions

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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