build

package
v1.0.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	BuildCacheVersion = "1"

	LocalImageStageImageNameFormat = "image-stage-%s"
	LocalImageStageImageFormat     = "image-stage-%s:%s"
)

Variables

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

Functions

This section is empty.

Types

type BuildOptions added in v1.2.0

type BuildOptions struct {
	ImageBuildOptions imagePkg.BuildOptions
}

type BuildPhase

type BuildPhase struct {
	BuildOptions
}

func NewBuildPhase

func NewBuildPhase(opts BuildOptions) *BuildPhase

func (*BuildPhase) Run

func (p *BuildPhase) 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, buildDir, baseTmpDir, sshAuthSock string, authorizer DockerAuthorizer) *Conveyor

func (*Conveyor) BP

func (c *Conveyor) BP(repo string, buildOpts BuildOptions, pushOpts PushOptions) error

func (*Conveyor) Build added in v1.2.0

func (c *Conveyor) Build(opts BuildOptions) error

func (*Conveyor) GetBuildingGitStage

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

func (*Conveyor) GetDockerAuthorizer

func (c *Conveyor) GetDockerAuthorizer() DockerAuthorizer

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

func (c *Conveyor) Push(repo string, opts PushOptions) error

func (*Conveyor) ReInitRuntimeFields

func (c *Conveyor) ReInitRuntimeFields()

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

func (c *Conveyor) Tag(repo string, opts TagOptions) error

type DockerAuthorizer

type DockerAuthorizer interface {
	LoginForPull(repo string) error
	LoginForPush(repo string) 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) LogName

func (i *Image) LogName() 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 PrepareImagesPhase

type PrepareImagesPhase struct{}

func NewPrepareImagesPhase

func NewPrepareImagesPhase() *PrepareImagesPhase

func (*PrepareImagesPhase) Run

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

type PushOptions

type PushOptions struct {
	TagOptions
	WithStages bool
}

type PushPhase

type PushPhase struct {
	WithStages   bool
	Repo         string
	TagsByScheme map[TagScheme][]string
}

func NewPushPhase

func NewPushPhase(repo string, opts PushOptions) *PushPhase

func (*PushPhase) Run

func (p *PushPhase) 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{}

func NewSignaturesPhase

func NewSignaturesPhase() *SignaturesPhase

func (*SignaturesPhase) Run

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

type TagOptions

type TagOptions struct {
	Tags            []string
	TagsByGitTag    []string
	TagsByGitBranch []string
	TagsByGitCommit []string
	TagsByCI        []string
}

type TagPhase

type TagPhase struct {
	Repo         string
	TagsByScheme map[TagScheme][]string
}

func NewTagPhase

func NewTagPhase(repo string, opts TagOptions) *TagPhase

func (*TagPhase) Run

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

type TagScheme

type TagScheme string
const (
	CustomScheme    TagScheme = "custom"
	GitTagScheme    TagScheme = "git_tag"
	GitBranchScheme TagScheme = "git_branch"
	GitCommitScheme TagScheme = "git_commit"
	CIScheme        TagScheme = "ci"

	RepoImageStageTagFormat = "image-stage-%s"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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