Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/compose/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ func runUp(
return err
}
bo.Services = services
bo.Deps = !upOptions.noDeps
build = &bo
}

Expand Down
12 changes: 12 additions & 0 deletions pkg/e2e/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,3 +524,15 @@ func TestBuildEntitlements(t *testing.T) {
}
})
}

func TestBuildDependsOn(t *testing.T) {
c := NewParallelCLI(t)

t.Cleanup(func() {
c.RunDockerComposeCmd(t, "-f", "fixtures/build-dependencies/compose-depends_on.yaml", "down", "--rmi=local")
})

res := c.RunDockerComposeCmd(t, "-f", "fixtures/build-dependencies/compose-depends_on.yaml", "--progress=plain", "up", "test2")
out := res.Combined()
assert.Check(t, strings.Contains(out, "test1 Built"))
}
15 changes: 15 additions & 0 deletions pkg/e2e/fixtures/build-dependencies/compose-depends_on.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
test1:
pull_policy: build
build:
dockerfile_inline: FROM alpine
command:
- echo
- "test 1 success"
test2:
image: alpine
depends_on:
- test1
command:
- echo
- "test 2 success"