Skip to content

Commit 23fc76a

Browse files
AnvarUndeloof
authored andcommitted
Fix quiet option when using COMPOSE_BAKE=1
Signed-off-by: Anvar Umuraliev <an.umuraliev@gmail.com>
1 parent 053d225 commit 23fc76a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/compose/build_bake.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ func (s *composeService) doBuildBake(ctx context.Context, project *types.Project
261261
if options.Builder != "" {
262262
args = append(args, "--builder", options.Builder)
263263
}
264+
if options.Quiet {
265+
args = append(args, "--progress=quiet")
266+
}
264267

265268
logrus.Debugf("Executing bake with args: %v", args)
266269

pkg/e2e/build_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ func TestLocalComposeBuild(t *testing.T) {
128128
assert.Assert(t, !strings.Contains(res.Stdout(), "failed to push"), res.Stdout())
129129
})
130130

131+
t.Run(env+" build --quiet", func(t *testing.T) {
132+
res := c.RunDockerComposeCmd(t, "--project-directory", "fixtures/build-test", "build", "--quiet")
133+
res.Assert(t, icmd.Expected{Out: ""})
134+
})
135+
131136
t.Run(env+" cleanup build project", func(t *testing.T) {
132137
c.RunDockerComposeCmd(t, "--project-directory", "fixtures/build-test", "down")
133138
c.RunDockerOrExitError(t, "rmi", "-f", "build-test-nginx")

0 commit comments

Comments
 (0)