builder: changes needed since buildkit 0.10.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
a2aaf4cc83
commit
aadb3bf766
3 changed files with 13 additions and 3 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/leases"
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/containerd/containerd/snapshots"
|
||||
|
@ -198,7 +199,7 @@ func (s *snapshotter) getGraphDriverID(key string) (string, bool) {
|
|||
if err := s.db.View(func(tx *bolt.Tx) error {
|
||||
b := tx.Bucket([]byte(key))
|
||||
if b == nil {
|
||||
return errors.Errorf("not found") // TODO: typed
|
||||
return errors.Wrapf(errdefs.ErrNotFound, "key %s", key)
|
||||
}
|
||||
v := b.Get(keyCommitted)
|
||||
if v != nil {
|
||||
|
@ -242,7 +243,7 @@ func (s *snapshotter) Stat(ctx context.Context, key string) (snapshots.Info, err
|
|||
if err := s.db.View(func(tx *bolt.Tx) error {
|
||||
b := tx.Bucket([]byte(id))
|
||||
if b == nil && l == nil {
|
||||
return errors.Errorf("snapshot %s not found", id) // TODO: typed
|
||||
return errors.Wrapf(errdefs.ErrNotFound, "snapshot %s", id)
|
||||
}
|
||||
inf.Name = key
|
||||
if b != nil {
|
||||
|
|
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/docker/docker/reference"
|
||||
"github.com/moby/buildkit/exporter"
|
||||
"github.com/moby/buildkit/exporter/containerimage/exptypes"
|
||||
"github.com/moby/buildkit/util/compression"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
@ -69,7 +70,11 @@ func (e *imageExporterInstance) Name() string {
|
|||
}
|
||||
|
||||
func (e *imageExporterInstance) Config() exporter.Config {
|
||||
return exporter.Config{}
|
||||
return exporter.Config{
|
||||
Compression: compression.Config{
|
||||
Type: compression.Default,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (e *imageExporterInstance) Export(ctx context.Context, inp exporter.Source, sessionID string) (map[string]string, error) {
|
||||
|
|
|
@ -185,6 +185,10 @@ func (w *Worker) ResolveOp(v solver.Vertex, s frontend.FrontendLLBBridge, sm *se
|
|||
return ops.NewFileOp(v, op, w.CacheManager(), parallelism, w)
|
||||
case *pb.Op_Build:
|
||||
return ops.NewBuildOp(v, op, s, w)
|
||||
case *pb.Op_Merge:
|
||||
return ops.NewMergeOp(v, op, w)
|
||||
case *pb.Op_Diff:
|
||||
return ops.NewDiffOp(v, op, w)
|
||||
}
|
||||
}
|
||||
return nil, errors.Errorf("could not resolve %v", v)
|
||||
|
|
Loading…
Add table
Reference in a new issue