builder: more experimental/windows validation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
6aa76adf59
commit
577732f655
2 changed files with 15 additions and 1 deletions
|
@ -244,6 +244,10 @@ func (br *buildRouter) postBuild(ctx context.Context, w http.ResponseWriter, r *
|
|||
return progress.NewProgressReader(in, progressOutput, r.ContentLength, "Downloading context", buildOptions.RemoteContext)
|
||||
}
|
||||
|
||||
if buildOptions.Version == types.BuilderBuildKit && !br.daemon.HasExperimental() {
|
||||
return errdefs.InvalidParameter(errors.New("buildkit is only supported with experimental mode"))
|
||||
}
|
||||
|
||||
wantAux := versions.GreaterThanOrEqualTo(version, "1.30")
|
||||
|
||||
imgID, err := br.backend.Build(ctx, backend.BuildConfig{
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
package buildkit
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
"github.com/moby/buildkit/cache"
|
||||
"github.com/moby/buildkit/executor"
|
||||
)
|
||||
|
||||
func newExecutor(_ string) (executor.Executor, error) {
|
||||
return nil, errors.New("buildkit executor not implemented for windows")
|
||||
return &winExecutor{}, nil
|
||||
}
|
||||
|
||||
type winExecutor struct {
|
||||
}
|
||||
|
||||
func (e *winExecutor) Exec(ctx context.Context, meta executor.Meta, rootfs cache.Mountable, mounts []executor.Mount, stdin io.ReadCloser, stdout, stderr io.WriteCloser) error {
|
||||
return errors.New("buildkit executor not implemented for windows")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue