mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
build: add experimental support for print flag
Print flag can be used to make additional information requests about the build and print their results. Currently Dockerfile supports: outline, targets, subrequests.describe Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
22
vendor/github.com/moby/buildkit/client/diskusage.go
generated
vendored
22
vendor/github.com/moby/buildkit/client/diskusage.go
generated
vendored
@ -10,18 +10,18 @@ import (
|
||||
)
|
||||
|
||||
type UsageInfo struct {
|
||||
ID string
|
||||
Mutable bool
|
||||
InUse bool
|
||||
Size int64
|
||||
ID string `json:"id"`
|
||||
Mutable bool `json:"mutable"`
|
||||
InUse bool `json:"inUse"`
|
||||
Size int64 `json:"size"`
|
||||
|
||||
CreatedAt time.Time
|
||||
LastUsedAt *time.Time
|
||||
UsageCount int
|
||||
Parents []string
|
||||
Description string
|
||||
RecordType UsageRecordType
|
||||
Shared bool
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
LastUsedAt *time.Time `json:"lastUsedAt"`
|
||||
UsageCount int `json:"usageCount"`
|
||||
Parents []string `json:"parents"`
|
||||
Description string `json:"description"`
|
||||
RecordType UsageRecordType `json:"recordType"`
|
||||
Shared bool `json:"shared"`
|
||||
}
|
||||
|
||||
func (c *Client) DiskUsage(ctx context.Context, opts ...DiskUsageOption) ([]*UsageInfo, error) {
|
||||
|
8
vendor/github.com/moby/buildkit/client/info.go
generated
vendored
8
vendor/github.com/moby/buildkit/client/info.go
generated
vendored
@ -9,13 +9,13 @@ import (
|
||||
)
|
||||
|
||||
type Info struct {
|
||||
BuildkitVersion BuildkitVersion
|
||||
BuildkitVersion BuildkitVersion `json:"buildkitVersion"`
|
||||
}
|
||||
|
||||
type BuildkitVersion struct {
|
||||
Package string
|
||||
Version string
|
||||
Revision string
|
||||
Package string `json:"package"`
|
||||
Version string `json:"version"`
|
||||
Revision string `json:"revision"`
|
||||
}
|
||||
|
||||
func (c *Client) Info(ctx context.Context) (*Info, error) {
|
||||
|
2
vendor/github.com/moby/buildkit/client/llb/sourcemap.go
generated
vendored
2
vendor/github.com/moby/buildkit/client/llb/sourcemap.go
generated
vendored
@ -61,7 +61,7 @@ func (smc *sourceMapCollector) Add(dgst digest.Digest, ls []*SourceLocation) {
|
||||
}
|
||||
smc.index[l.SourceMap] = idx
|
||||
}
|
||||
smc.locations[dgst] = ls
|
||||
smc.locations[dgst] = append(smc.locations[dgst], ls...)
|
||||
}
|
||||
|
||||
func (smc *sourceMapCollector) Marshal(ctx context.Context, co ...ConstraintsOpt) (*pb.Source, error) {
|
||||
|
2
vendor/github.com/moby/buildkit/client/llb/state.go
generated
vendored
2
vendor/github.com/moby/buildkit/client/llb/state.go
generated
vendored
@ -199,10 +199,10 @@ func marshal(ctx context.Context, v Vertex, def *Definition, s *sourceMapCollect
|
||||
if opMeta != nil {
|
||||
def.Metadata[dgst] = mergeMetadata(def.Metadata[dgst], *opMeta)
|
||||
}
|
||||
s.Add(dgst, sls)
|
||||
if _, ok := cache[dgst]; ok {
|
||||
return def, nil
|
||||
}
|
||||
s.Add(dgst, sls)
|
||||
def.Def = append(def.Def, dt)
|
||||
cache[dgst] = struct{}{}
|
||||
return def, nil
|
||||
|
6
vendor/github.com/moby/buildkit/client/solve.go
generated
vendored
6
vendor/github.com/moby/buildkit/client/solve.go
generated
vendored
@ -209,8 +209,10 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG
|
||||
<-time.After(3 * time.Second)
|
||||
cancelStatus()
|
||||
}()
|
||||
bklog.G(ctx).Debugf("stopping session")
|
||||
s.Close()
|
||||
if !opt.SessionPreInitialized {
|
||||
bklog.G(ctx).Debugf("stopping session")
|
||||
s.Close()
|
||||
}
|
||||
}()
|
||||
var pbd *pb.Definition
|
||||
if def != nil {
|
||||
|
Reference in New Issue
Block a user