build: add logger for auth

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
pull/469/head
Tonis Tiigi 4 years ago
parent 69a1419ab1
commit 6b6afc4077

@ -26,6 +26,7 @@ import (
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/session/upload/uploadprovider"
"github.com/moby/buildkit/util/entitlements"
"github.com/moby/buildkit/util/progress/progresswriter"
"github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
@ -527,6 +528,15 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
defers = append(defers, release)
m[k][i].so = so
}
for _, at := range opt.Session {
if s, ok := at.(interface {
SetLogger(progresswriter.Logger)
}); ok {
s.SetLogger(func(s *client.SolveStatus) {
w.Write(s)
})
}
}
}
resp = map[string]*client.SolveResponse{}

Loading…
Cancel
Save