1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #41648 from thaJeztah/fix_stream_detection

builder: fix detection of experimental --stream option (deprecated)
This commit is contained in:
Brian Goff 2020-11-06 14:13:25 -08:00 committed by GitHub
commit b5ea9abf25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 10 deletions

View file

@ -85,10 +85,6 @@ func (bm *BuildManager) Build(ctx context.Context, config backend.BuildConfig) (
ctx, cancel := context.WithCancel(ctx) ctx, cancel := context.WithCancel(ctx)
defer cancel() defer cancel()
if config.Options.SessionID != "" {
return nil, errors.New("experimental session with v1 builder is no longer supported, use builder version v2 (BuildKit) instead")
}
builderOptions := builderOptions{ builderOptions := builderOptions{
Options: config.Options, Options: config.Options,
ProgressWriter: config.ProgressWriter, ProgressWriter: config.ProgressWriter,

View file

@ -33,12 +33,7 @@ func Detect(config backend.BuildConfig) (remote builder.Source, dockerfile *pars
case remoteURL == "": case remoteURL == "":
remote, dockerfile, err = newArchiveRemote(config.Source, dockerfilePath) remote, dockerfile, err = newArchiveRemote(config.Source, dockerfilePath)
case remoteURL == ClientSessionRemote: case remoteURL == ClientSessionRemote:
res, err := parser.Parse(config.Source) return nil, nil, errdefs.InvalidParameter(errors.New("experimental session with v1 builder is no longer supported, use builder version v2 (BuildKit) instead"))
if err != nil {
return nil, nil, errdefs.InvalidParameter(err)
}
return nil, res, nil
case urlutil.IsGitURL(remoteURL): case urlutil.IsGitURL(remoteURL):
remote, dockerfile, err = newGitRemote(remoteURL, dockerfilePath) remote, dockerfile, err = newGitRemote(remoteURL, dockerfilePath)
case urlutil.IsURL(remoteURL): case urlutil.IsURL(remoteURL):