build

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildCacheVersion = "33"

	LocalDimgstageImageNameFormat = "dimgstage-%s"
	LocalDimgstageImageFormat     = "dimgstage-%s:%s"
)
View Source
const DappCacheVersionLabel = "dapp-cache-version"

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildPhase

type BuildPhase struct{}

func NewBuildPhase

func NewBuildPhase() *BuildPhase

func (*BuildPhase) Run

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

type Conveyor

type Conveyor struct {
	Dappfile           []*config.Dimg
	DimgsInOrder       []*Dimg
	DimgNamesToProcess []string

	ProjectName string

	ProjectDir       string
	ProjectBuildDir  string
	ContainerDappDir string
	TmpDir           string

	SSHAuthSock string
	// contains filtered or unexported fields
}

func NewConveyor

func NewConveyor(dappfile []*config.Dimg, dimgNamesToProcess []string, projectDir, projectName, buildDir, tmpDir, sshAuthSock string, authorizer DockerAuthorizer) *Conveyor

func (*Conveyor) BP

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

func (*Conveyor) Build added in v1.2.0

func (c *Conveyor) Build() error

func (*Conveyor) GetBuildingGAStage

func (c *Conveyor) GetBuildingGAStage(dimgName string) stage.StageName

func (*Conveyor) GetDimg

func (c *Conveyor) GetDimg(name string) *Dimg

func (*Conveyor) GetDimgImageName

func (c *Conveyor) GetDimgImageName(dimgName string) string

func (*Conveyor) GetDimgSignature

func (c *Conveyor) GetDimgSignature(dimgName string) string

func (*Conveyor) GetDimgTmpDir

func (c *Conveyor) GetDimgTmpDir(dimgName string) string

func (*Conveyor) GetDockerAuthorizer

func (c *Conveyor) GetDockerAuthorizer() DockerAuthorizer

func (*Conveyor) GetImage

func (c *Conveyor) GetImage(name string) *image.Stage

func (*Conveyor) GetImageBySignature

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

func (*Conveyor) GetOrCreateImage

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

func (*Conveyor) Push

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

func (*Conveyor) SetBuildingGAStage

func (c *Conveyor) SetBuildingGAStage(dimgName string, stageName stage.StageName)

func (*Conveyor) SetImageBySignature

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

type Dimg

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

func (*Dimg) GetBaseImage

func (d *Dimg) GetBaseImage() *image.Stage

func (*Dimg) GetName

func (d *Dimg) GetName() string

func (*Dimg) GetStage

func (d *Dimg) GetStage(name stage.StageName) stage.Interface

func (*Dimg) GetStages

func (d *Dimg) GetStages() []stage.Interface

func (*Dimg) LatestStage

func (d *Dimg) LatestStage() stage.Interface

func (*Dimg) PrepareBaseImage

func (d *Dimg) PrepareBaseImage(c *Conveyor) error

func (*Dimg) SetStages

func (d *Dimg) SetStages(stages []stage.Interface)

func (*Dimg) SetupBaseImage

func (d *Dimg) SetupBaseImage(c *Conveyor)

type DockerAuthorizer

type DockerAuthorizer interface {
	LoginForPull(repo string) error
	LoginForPush(repo string) error
}

type InitializationPhase

type InitializationPhase struct{}

func NewInitializationPhase

func NewInitializationPhase() *InitializationPhase

func (*InitializationPhase) Run

func (p *InitializationPhase) Run(c *Conveyor) 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 TagScheme

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

	RepoDimgstageTagFormat = "dimgstage-%s"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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