Skip to content

Commit

Permalink
build: set same ref id when building on multiple nodes
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jul 3, 2024
1 parent 5656c98 commit 3de5d7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/exporter/containerimage/exptypes"
gateway "github.com/moby/buildkit/frontend/gateway/client"
"github.com/moby/buildkit/identity"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/solver/errdefs"
"github.com/moby/buildkit/solver/pb"
Expand Down Expand Up @@ -216,6 +217,9 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
if err != nil {
logrus.WithError(err).Warn("current commit information was not captured by the build")
}
if opt.Ref == "" {
opt.Ref = identity.NewID()
}
var reqn []*reqForNode
for _, np := range drivers[k] {
if np.Node().Driver.IsMobyDriver() {
Expand Down

0 comments on commit 3de5d7c

Please sign in to comment.