Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerBuilderFun ¶
type DockerBuilderFun = func(ctx context.Context, mts *MultiTarget, dockerTag string, outFile string) error
DockerBuilderFun is a function able to build a target into a docker tar file.
type MultiTarget ¶
type MultiTarget struct { // Visited represents the previously visited states, grouped by target // name. Duplicate targets are possible if same target is called with different // build args. Visited *VisitedCollection // Final is the main target to be built. Final *SingleTarget }
MultiTarget holds LLB states representing multiple earthly targets, in the order in which they should be built.
func (*MultiTarget) All ¶
func (mts *MultiTarget) All() []*SingleTarget
All returns all SingleTarget contained within.
func (*MultiTarget) FinalTarget ¶
func (mts *MultiTarget) FinalTarget() domain.Target
FinalTarget returns the final target of the states.
type RunPush ¶
RunPush is a series of RUN --push commands to be run after the build has been deemed as successful.
type SaveImage ¶
type SaveImage struct { State llb.State Image *image.Image DockerTag string Push bool // CacheHint instructs Earthly to save a separate ref for this image, even if no tag is // provided. CacheHint bool }
SaveImage is a docker image to be saved.
type SaveLocal ¶
type SaveLocal struct { // DestPath is the local dest path to copy the artifact to. DestPath string // ArtifactPath is the relative path within the artifacts image. ArtifactPath string // Index is the index number of the "save as local" command encountered. Starts as 0. Index int }
SaveLocal is an artifact path to be saved to local disk.
type SingleTarget ¶
type SingleTarget struct { Target domain.Target TargetInput dedup.TargetInput MainImage *image.Image MainState llb.State ArtifactsState llb.State SeparateArtifactsState []llb.State SaveLocals []SaveLocal SaveImages []SaveImage VarCollection *variables.Collection RunPush RunPush LocalDirs map[string]string Ongoing bool Salt string // HasDangling represents whether the target has dangling instructions - // ie if there are any non-SAVE commands after the first SAVE command, // or if the target is invoked via BUILD command (not COPY nor FROM). HasDangling bool }
SingleTarget holds LLB states representing an earthly target.
func (*SingleTarget) LastSaveImage ¶
func (sts *SingleTarget) LastSaveImage() SaveImage
LastSaveImage returns the last save image available (if any).
type VisitedCollection ¶ added in v0.3.12
type VisitedCollection struct { Visited map[string][]*SingleTarget // Same collection as above, but as a list, to make the ordering consistent. VisitedList []*SingleTarget }
VisitedCollection is a collection of visited targets.
func NewVisitedCollection ¶ added in v0.3.12
func NewVisitedCollection() *VisitedCollection
NewVisitedCollection returns a collection of visited targets.
func (*VisitedCollection) Add ¶ added in v0.3.12
func (vc *VisitedCollection) Add(target string, sts *SingleTarget)
Add adds a target to the collection.