build: rework build package to use only a single Build call
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
15
vendor/github.com/moby/buildkit/util/progress/progressui/display.go
generated
vendored
15
vendor/github.com/moby/buildkit/util/progress/progressui/display.go
generated
vendored
@@ -42,7 +42,7 @@ func WithDesc(text string, console string) DisplaySolveStatusOpt {
|
||||
}
|
||||
}
|
||||
|
||||
func DisplaySolveStatus(ctx context.Context, c console.Console, w io.Writer, ch chan *client.SolveStatus, opts ...DisplaySolveStatusOpt) ([]client.VertexWarning, error) {
|
||||
func DisplaySolveStatus(ctx context.Context, c console.Console, w io.Writer, ch chan *client.SolveStatus, paused *bool, opts ...DisplaySolveStatusOpt) ([]client.VertexWarning, error) {
|
||||
modeConsole := c != nil
|
||||
|
||||
dsso := &displaySolveStatusOpts{}
|
||||
@@ -78,6 +78,11 @@ func DisplaySolveStatus(ctx context.Context, c console.Console, w io.Writer, ch
|
||||
|
||||
displayLimiter := rate.NewLimiter(rate.Every(displayTimeout), 1)
|
||||
|
||||
ispaused := false
|
||||
if paused != nil {
|
||||
ispaused = *paused
|
||||
}
|
||||
|
||||
var height int
|
||||
width, _ := disp.getSize()
|
||||
for {
|
||||
@@ -93,6 +98,10 @@ func DisplaySolveStatus(ctx context.Context, c console.Console, w io.Writer, ch
|
||||
}
|
||||
}
|
||||
|
||||
if paused != nil && *paused && ispaused {
|
||||
continue
|
||||
}
|
||||
|
||||
if modeConsole {
|
||||
width, height = disp.getSize()
|
||||
if done {
|
||||
@@ -115,6 +124,10 @@ func DisplaySolveStatus(ctx context.Context, c console.Console, w io.Writer, ch
|
||||
ticker = time.NewTicker(tickerTimeout)
|
||||
}
|
||||
}
|
||||
|
||||
if paused != nil {
|
||||
ispaused = *paused
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
vendor/github.com/moby/buildkit/util/progress/progresswriter/printer.go
generated
vendored
2
vendor/github.com/moby/buildkit/util/progress/progresswriter/printer.go
generated
vendored
@@ -87,7 +87,7 @@ func NewPrinter(ctx context.Context, out console.File, mode string) (Writer, err
|
||||
|
||||
go func() {
|
||||
// not using shared context to not disrupt display but let is finish reporting errors
|
||||
_, pw.err = progressui.DisplaySolveStatus(ctx, c, out, statusCh)
|
||||
_, pw.err = progressui.DisplaySolveStatus(ctx, c, out, statusCh, nil)
|
||||
close(doneCh)
|
||||
}()
|
||||
return pw, nil
|
||||
|
||||
Reference in New Issue
Block a user