Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 68a2125

Browse files
authored
add test case: build only
Signed-off-by: GitHub <[email protected]>
1 parent 88a6045 commit 68a2125

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

local/e2e/compose/fixtures/dry-run-test/pull/compose.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ services:
88
expectedFail:
99
# this image is not expected to be registered on any registries
1010
image: expected-not-to-be-registered
11+
command: top
12+
expectedSkip-build:
13+
build: Dockerfile
1114
command: top

pkg/compose/pull.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ func getPullPlan(service types.ServiceConfig, localDigests []string, dstrDigest
191191
}
192192
}
193193

194-
if dstrDigest == "" {
194+
if service.Image == "" {
195+
// build only service
196+
plan = pullPlanSkip
197+
} else if dstrDigest == "" {
195198
plan = pullPlanFail
196199
} else if canSkip {
197200
plan = pullPlanSkip

0 commit comments

Comments
 (0)