@@ -73,6 +73,7 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti
73
73
var (
74
74
b * builder.Builder
75
75
nodes []builder.Node
76
+ w * xprogress.Printer
76
77
)
77
78
if buildkitEnabled {
78
79
builderName := options .Builder
@@ -88,17 +89,22 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti
88
89
if err != nil {
89
90
return nil , err
90
91
}
91
- }
92
92
93
- // Progress needs its own context that lives longer than the
94
- // build one otherwise it won't read all the messages from
95
- // build and will lock
96
- progressCtx , cancel := context .WithCancel (context .Background ())
97
- defer cancel ()
93
+ // Progress needs its own context that lives longer than the
94
+ // build one otherwise it won't read all the messages from
95
+ // build and will lock
96
+ progressCtx , cancel := context .WithCancel (context .Background ())
97
+ defer cancel ()
98
98
99
- w , err := xprogress .NewPrinter (progressCtx , s .stdout (), os .Stdout , options .Progress )
100
- if err != nil {
101
- return nil , err
99
+ w , err = xprogress .NewPrinter (progressCtx , s .stdout (), os .Stdout , options .Progress ,
100
+ xprogress .WithDesc (
101
+ fmt .Sprintf ("building with %q instance using %s driver" , b .Name , b .Driver ),
102
+ fmt .Sprintf ("%s:%s" , b .Driver , b .Name ),
103
+ ))
104
+
105
+ if err != nil {
106
+ return nil , err
107
+ }
102
108
}
103
109
104
110
builtDigests := make ([]string , len (project .Services ))
@@ -152,8 +158,10 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti
152
158
})
153
159
154
160
// enforce all build event get consumed
155
- if errw := w .Wait (); errw != nil {
156
- return nil , errw
161
+ if buildkitEnabled {
162
+ if errw := w .Wait (); errw != nil {
163
+ return nil , errw
164
+ }
157
165
}
158
166
159
167
if err != nil {
0 commit comments