Browse code

Adding builder version

Signed-off-by: Krystian Wojcicki <kwojcicki@sympatico.ca>

Krystian Wojcicki authored on 2019/01/22 09:02:16
Showing 3 changed files
... ...
@@ -44,6 +44,8 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht
44 44
 		info.Swarm = s.cluster.Info()
45 45
 	}
46 46
 
47
+	info.Builder = build.BuilderVersion(*s.features)
48
+
47 49
 	if versions.LessThan(httputils.VersionFromContext(ctx), "1.25") {
48 50
 		// TODO: handle this conversion in engine-api
49 51
 		type oldInfo struct {
... ...
@@ -146,6 +146,7 @@ type Commit struct {
146 146
 // GET "/info"
147 147
 type Info struct {
148 148
 	ID                 string
149
+	Builder            BuilderVersion
149 150
 	Containers         int
150 151
 	ContainersRunning  int
151 152
 	ContainersPaused   int
... ...
@@ -35,7 +35,8 @@ func TestInfoAPI(t *testing.T) {
35 35
 		"KernelVersion",
36 36
 		"Driver",
37 37
 		"ServerVersion",
38
-		"SecurityOptions"}
38
+		"SecurityOptions",
39
+		"Builder"}
39 40
 
40 41
 	out := fmt.Sprintf("%+v", info)
41 42
 	for _, linePrefix := range stringsToCheck {