Skip to content

Commit

Permalink
Execute builds in a single BuildKit session (most pieces anyway), get…
Browse files Browse the repository at this point in the history
… rid of fakedep (#453)

* Add gwClient param in converter.

* Some prep work.

* Working multi-export. Need to clean up though.

* Minor cleanup.

* Ensure that main state is built every time.

* Consistent ordering of outputs.

* Support for outputting dirs.

* Cleanup - decouple meta and ref names.

* Minor.

* Output artifacts correctly. Correct printouts after success line.

* Get rid of fake dep which was causing huge performance issues.

* Bring --no-output back to life.

* Fix --no-output. WIP

* Working --image and --artifact modes.

* Cleanup.

* Point to earthly/buildkit:earthly-master again.

* Get rid of some code that we no longer use.

Co-authored-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
  • Loading branch information
vladaionescu and vladaionescu committed Oct 27, 2020
1 parent f627840 commit 0f48f14
Show file tree
Hide file tree
Showing 15 changed files with 396 additions and 312 deletions.
3 changes: 2 additions & 1 deletion buildcontext/git.go
Expand Up @@ -124,7 +124,7 @@ func (gr *gitResolver) resolveGitProject(ctx context.Context, target domain.Targ
llb.WithCustomNamef("[internal] COPY GIT CLONE %s Earthfile", target.ProjectCanonical()),
}
opImg := llb.Image(
defaultGitImage, llb.MarkImageInternal,
defaultGitImage, llb.MarkImageInternal, llb.ResolveModePreferLocal,
llb.Platform(llbutil.TargetPlatform))
copyOp := opImg.Run(copyOpts...)
earthfileState := copyOp.AddMount("/dest", llb.Scratch().Platform(llbutil.TargetPlatform))
Expand Down Expand Up @@ -160,6 +160,7 @@ func (gr *gitResolver) resolveGitProject(ctx context.Context, target domain.Targ
gr.cleanCollection.Add(func() error {
return os.RemoveAll(earthfileTmpDir)
})
// TODO: Use gwClient to download solved files instead of executing a full build like this.
err = gr.artifactBuilderFun(ctx, mts, artifact, fmt.Sprintf("%s/", earthfileTmpDir))
if err != nil {
return nil, "", "", errors.Wrap(err, "build git")
Expand Down

0 comments on commit 0f48f14

Please sign in to comment.