Nicolas De Loof
0368f19030
distinguish stdout and stderr in `up` logs
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-13 14:42:42 +01:00
Nicolas De Loof
3ee2ab87bb
ContainerStart must run sequentially for engine to assing distinct ports within configured range
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-12 16:08:50 +01:00
Nicolas De Loof
804d7163a7
detect required service are gone to stop watching
...
explicit API to stop the log printer
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-07 21:07:27 +01:00
Sebastiaan van Stijn
87a0a57f70
Cleanup tips from output
...
The scan tip has been shown for two years, and most users will know
about it by now. Presenting the message also involved checking if the
plugin was installed, and wether or not the message was shown before,
which also caused some overhead, so cleaning up the output a bit.
The corresponding DOCKER_SCAN_SUGGEST environment-variable is also
removed with this.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-06 23:29:03 +01:00
Guillaume Lours
95bc6c58b7
check only running containers in after down tests of profiles e2e tests
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-06 23:17:14 +01:00
Milas Bowman
113fb6732d
schema: add support for tmpfs.mode in mount definition ( #10031 )
...
See compose-spec/compose-go#325 for the acutal spec change. This
propagates it to the Engine API object and adds an E2E test via
Cucumber 🥒
Fixes #9873 .
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-12-02 11:21:53 -05:00
Guillaume Lours
707d55c77f
add file header and cleanup profiles e2e tests
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-30 13:21:16 +01:00
Guillaume Lours
5edd783032
add e2e tests to check profile activation via targeted service
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-30 13:21:16 +01:00
Guillaume Lours
6fbef29619
add e2e tests to check no profile usages
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-30 13:21:16 +01:00
Guillaume Lours
7fe43a8b4a
add e2e tests using explicitly profiles
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-30 13:21:16 +01:00
Guillaume Lours
8c1e2af3e1
add e2e tests to check build dependency between services
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-15 14:43:53 +01:00
Laura Brehm
dd13299ede
Skip flaky test in CI
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-10-20 18:30:27 +02:00
Ulysses Souza
91eae4f035
Add Codecov
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-10-17 15:32:51 +02:00
Laura Brehm
25c4bcef85
Merge pull request #9824 from laurazard/cucumber-test
...
🥒 Cucumber PoC 🥒
2022-09-27 23:38:44 +02:00
Laura Brehm
fffe7fff57
Create new `e2e` module to separate out test dependencies, move cucumber tests
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-27 02:13:52 +02:00
Laura Brehm
0a5f4e62e4
Removed tests that were replaced by Cucumber features
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-27 02:13:52 +02:00
Laura Brehm
266ab22d53
Rename start cucumber feature
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-27 02:13:51 +02:00
Laura Brehm
a7476c8eeb
Convert `cascade_stop_test.go` into a cucumber feature `stop.feature`
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-27 02:13:51 +02:00
Laura Brehm
15ebff00b1
Cucumber test setup/fixtures
...
(run with `go test -v -run ^TestCucumberFeatures$ github.com/docker/compose/v2/pkg/e2e/cucumber`)
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-27 02:13:47 +02:00
Bartłomiej Klimczak
0d0a02cc6b
add more information when service.platform isn't part of service.build.platforms
...
Signed-off-by: Bartłomiej Klimczak <bartlomiej.klimczak88@gmail.com>
2022-09-26 20:44:59 +02:00
Laura Brehm
94465d57cc
Merge pull request #9863 from docker/gha-win-mac-runners
...
Add `merge` GitHub Actions workflow to run tests on Windows and macOS runners
2022-09-21 16:39:27 +02:00
Laura Brehm
a1984ca1de
Skip some tests in CI due to flakiness
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
Laura Brehm
118b4f07e5
Increase E2E test timeouts to reduce flakiness
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
Laura Brehm
8714f983ac
Temporarily disable broken E2E tests on Windows
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
Laura Brehm
937fa2dc8f
Add GitHub Action workflow to run tests on Mac/Windows runners
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:28 -04:00
Guillaume Lours
0e975262da
keep the platform defined at service level during build if no build platforms provided
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-15 08:30:52 +02:00
Milas Bowman
403d691abf
small cleanup + godoc
...
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-13 18:29:33 +01:00
Milas Bowman
b49b9ffe7e
Merge remote-tracking branch 'upstream/v2' into down-image-rm
2022-09-13 18:00:41 +01:00
Milas Bowman
680763f8b7
down: refactor image pruning
...
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-13 17:23:44 +01:00
Lucas Berg
7a8d157871
convert: do not escape $ into $$ when using the --no-interpolate option ( #9703 )
...
Signed-off-by: Lucas Berg <root.lucasberg@gmail.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
Co-authored-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-09-08 16:25:23 -04:00
Laura Brehm
88df5ede42
Merge pull request #9797 from laurazard/start-only-services
...
Only attempt to start specified services on `compose start [services]`
2022-09-08 13:00:20 -04:00
Laura Brehm
a7cc406187
Cleanup E2E tests
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-08 12:49:42 -04:00
Milas Bowman
bc806da712
build: label built images for reliable cleanup on `down`
...
When running `compose down`, the `--rmi` flag can be passed,
which currently supports two values:
* `local`: remove any _implicitly-named_ images that Compose
built
* `all` : remove any named images (locally-built or fetched
from a remote repo)
Removing images in the `local` case can be problematic, as it's
historically been done via a fair amount of inference over the
Compose model. Additionally, when using the "project-model"
(by passing `--project-name` instead of using a Compose file),
we're even more limited: if no containers for the project are
running, there's nothing to derive state from to perform the
inference on.
As a first pass, we started labeling _containers_ with the name
of the locally-built image associated with it (if any) in #9715 .
Unfortunately, this still suffers from the aforementioned problems
around using actual state (i.e. the containers might no longer
exist) and meant that when operating in file mode (the default),
things did not behave as expected: the label is not available
in the project since it only exists at runtime.
Now, with these changes, Compose will label any images it builds
with project metadata. Upon cleanup during `down`, the engine
image API is queried for related images and matched up with the
services for the project. As a fallback for images built with
prior versions of Compose, the previous approach is still taken.
See also:
* https://github.com/docker/compose/issues/9655
* https://github.com/docker/compose/pull/9715
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-07 17:57:29 -04:00
Laura Brehm
361194472e
Cleanup E2E tests
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-06 20:28:35 +02:00
Guillaume Lours
e016faac33
don't push images at the end of multi-arch build (and simplify e2e tests)
...
support DOCKER_DEFAULT_PLATFORM when 'compose up --build'
add tests to check behaviour when DOCKER_DEFAULT_PLATFORM is defined
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-02 15:44:55 +02:00
Guillaume Lours
8ed2d8ad07
add a test with multiple service builds using platforms in the same compose file
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-02 15:44:55 +02:00
Guillaume Lours
537f023a3b
fix panic when using 'compose up --build'
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-02 15:44:55 +02:00
Guillaume Lours
8b1b70833e
add support of platforms in build section
...
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-09-02 15:44:55 +02:00
Laura Brehm
cc4f194295
Add E2E tests for starting/stopping single services
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-30 12:55:51 +02:00
Laura Brehm
0d2beddf20
Add E2E tests for `up --exit-code-from`
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-27 17:44:08 +02:00
Laura Brehm
235734823e
Pull image regardless of whether it exists locally if `tag=latest`
...
... and pull policy is `missing` or `if_not_present`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-23 16:57:40 +02:00
Nick Sieger
5723dee316
pull: only skip pull when policy is `missing`/`if_not_present`
...
Fixes #9773 .
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-08-22 09:22:20 -05:00
Vedant Koditkar
b96b5449e5
Merge branch 'v2' into 8768-avoid-pulling-same-image-multiple-times
2022-08-19 13:08:36 +05:30
Ulysses Souza
3f4f4e5975
Give environment variables precedence back to OS over .env
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-08-18 22:39:21 +02:00
Nick Sieger
09e6b0292a
up/start/run: don't wait for disabled service
...
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-08-17 12:32:10 -05:00
Vedant Koditkar
293cf21c58
Merge branch '8768-avoid-pulling-same-image-multiple-times' of github.com:KoditkarVedant/compose into 8768-avoid-pulling-same-image-multiple-times
2022-08-14 16:52:17 +05:30
Vedant Koditkar
25f4cb2ee6
Use compose to pull image twice
...
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-14 16:51:29 +05:30
Vedant Koditkar
817e875cbf
Merge branch 'v2' into 8768-avoid-pulling-same-image-multiple-times
2022-08-13 12:19:49 +05:30
Vedant Koditkar
79ed1290a6
Use alpine:3.13.12 to be unique across the test cases
...
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-13 02:59:44 +05:30
Vedant Koditkar
4853ace155
Fix package name
...
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-13 02:06:28 +05:30