Browse code

builder: fix compiling with buildkit on windows and integration tests

Signed-off-by: Tibor Vass <tibor@docker.com>

Tibor Vass authored on 2018/05/16 07:21:08
Showing 3 changed files
... ...
@@ -15,7 +15,6 @@ import (
15 15
 	"github.com/moby/buildkit/cache/metadata"
16 16
 	"github.com/moby/buildkit/cache/remotecache"
17 17
 	"github.com/moby/buildkit/control"
18
-	"github.com/moby/buildkit/executor/runcexecutor"
19 18
 	"github.com/moby/buildkit/exporter"
20 19
 	"github.com/moby/buildkit/frontend"
21 20
 	"github.com/moby/buildkit/frontend/dockerfile"
... ...
@@ -89,10 +88,7 @@ func newController(rt http.RoundTripper, opt Opt) (*control.Controller, error) {
89 89
 		return nil, err
90 90
 	}
91 91
 
92
-	exec, err := runcexecutor.New(runcexecutor.Opt{
93
-		Root:              filepath.Join(root, "executor"),
94
-		CommandCandidates: []string{"docker-runc", "runc"},
95
-	})
92
+	exec, err := newExecutor(root)
96 93
 	if err != nil {
97 94
 		return nil, err
98 95
 	}
99 96
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+// +build !windows
1
+
2
+package buildkit
3
+
4
+import (
5
+	"path/filepath"
6
+
7
+	"github.com/moby/buildkit/executor"
8
+	"github.com/moby/buildkit/executor/runcexecutor"
9
+)
10
+
11
+func newExecutor(root string) (executor.Executor, error) {
12
+	return runcexecutor.New(runcexecutor.Opt{
13
+		Root:              filepath.Join(root, "executor"),
14
+		CommandCandidates: []string{"docker-runc", "runc"},
15
+	})
16
+}
0 17
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+package buildkit
1
+
2
+import (
3
+	"errors"
4
+
5
+	"github.com/moby/buildkit/executor"
6
+)
7
+
8
+func newExecutor(_ string) (executor.Executor, error) {
9
+	return nil, errors.New("buildkit executor not implemented for windows")
10
+}