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

Adding builder version

Signed-off-by: Krystian Wojcicki <kwojcicki@sympatico.ca>
This commit is contained in:
Krystian Wojcicki 2019-01-21 19:02:16 -05:00
parent 5ec31380a5
commit f821f002e5
3 changed files with 5 additions and 1 deletions

View file

@ -44,6 +44,8 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht
info.Swarm = s.cluster.Info()
}
info.Builder = build.BuilderVersion(*s.features)
if versions.LessThan(httputils.VersionFromContext(ctx), "1.25") {
// TODO: handle this conversion in engine-api
type oldInfo struct {

View file

@ -146,6 +146,7 @@ type Commit struct {
// GET "/info"
type Info struct {
ID string
Builder BuilderVersion
Containers int
ContainersRunning int
ContainersPaused int

View file

@ -35,7 +35,8 @@ func TestInfoAPI(t *testing.T) {
"KernelVersion",
"Driver",
"ServerVersion",
"SecurityOptions"}
"SecurityOptions",
"Builder"}
out := fmt.Sprintf("%+v", info)
for _, linePrefix := range stringsToCheck {