implemented docker-login op to add custom registry credentials to the buildkit from a pipeline

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba
2021-04-26 17:39:19 -07:00
parent c28199c76e
commit 45ecc32423
4 changed files with 121 additions and 6 deletions

View File

@@ -113,7 +113,9 @@ 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) {
s := NewSolver(c.c, gw, ch, c.noCache)
// buildkit auth provider (registry)
auth := newRegistryAuthProvider()
s := NewSolver(c.c, gw, ch, auth, c.noCache)
lg.Debug().Msg("loading configuration")
if err := deployment.LoadPlan(ctx, s); err != nil {