fixed tests creds + added authprovider to client solver
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
_ "github.com/moby/buildkit/client/connhelper/dockercontainer" // import the container connection driver
|
||||
"github.com/moby/buildkit/client/llb"
|
||||
bkgw "github.com/moby/buildkit/frontend/gateway/client"
|
||||
"github.com/moby/buildkit/session"
|
||||
|
||||
// docker output
|
||||
"dagger.io/go/pkg/buildkitd"
|
||||
@@ -101,9 +102,13 @@ func (c *Client) buildfn(ctx context.Context, deployment *Deployment, fn ClientD
|
||||
localdirs[label] = abs
|
||||
}
|
||||
|
||||
// buildkit auth provider (registry)
|
||||
auth := newRegistryAuthProvider()
|
||||
|
||||
// Setup solve options
|
||||
opts := bk.SolveOpt{
|
||||
LocalDirs: localdirs,
|
||||
Session: []session.Attachable{auth},
|
||||
}
|
||||
|
||||
// Call buildkit solver
|
||||
@@ -113,8 +118,6 @@ func (c *Client) buildfn(ctx context.Context, deployment *Deployment, fn ClientD
|
||||
Msg("spawning buildkit job")
|
||||
|
||||
resp, err := c.c.Build(ctx, opts, "", func(ctx context.Context, gw bkgw.Client) (*bkgw.Result, error) {
|
||||
// buildkit auth provider (registry)
|
||||
auth := newRegistryAuthProvider()
|
||||
s := NewSolver(c.c, gw, ch, auth, c.noCache)
|
||||
|
||||
lg.Debug().Msg("loading configuration")
|
||||
|
Reference in New Issue
Block a user