compose/pkg/e2e/testdata/TestRunBuildOnceNestedDependencies/compose.yaml
Nicolas De Loof f4f6ac5324 test(e2e): volume and build-once scenarios
- volumes: external-volume switching, volume recreation on definition
  change and image volumes become scenarios; the two-compose-file
  fixtures collapse into one model with an interpolated volume name or
  label, so the changed definition is visible in the test. The rebuild
  scenario locks the Recreated expectation and scopes the source image
  to the project. TestLocalComposeVolume (fixed host port, HTTP) and
  TestProjectVolumeBind (host file written mid-test) stay legacy.
- build-once: the three run --build regression cases each get a
  scenario; OutputMatchesCount joins the vocabulary to count the build
  reports, replacing the hand-rolled regex counter, and image names are
  project-scoped instead of random suffixes.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-08-18 16:49:56 +02:00

28 lines
576 B
YAML

services:
db:
pull_policy: build
build:
dockerfile_inline: |
FROM alpine
RUN echo "DB built at $(date)" > /db-build.txt
CMD sleep 3600
api:
pull_policy: build
build:
dockerfile_inline: |
FROM alpine
RUN echo "API built at $(date)" > /api-build.txt
CMD sleep 3600
depends_on:
- db
app:
pull_policy: build
build:
dockerfile_inline: |
FROM alpine
RUN echo "App built at $(date)" > /app-build.txt
CMD echo "App running"
depends_on:
- api