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
Vedant Koditkar
de49bea774
Try changing package used to avoid any race condition in tests
...
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-12 23:06:51 +05:30
CrazyMax
5ec20296e4
Better sandboxed workflow and enhanced cross compilation
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-12 15:05:58 +02:00
Vedant Koditkar
0db6dfee03
make compose pull tests more expressive
...
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-10 21:48:27 +05:30
Milas Bowman
27227a8824
lint: add `nolintlint` and clean up `nolint` directives ( #9738 )
...
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-09 16:43:58 -04:00
Vedant Koditkar
e623b5ca1e
Merge branch 'v2' into 8768-avoid-pulling-same-image-multiple-times
2022-08-06 17:58:10 +05:30
Sebastiaan van Stijn
92f32b5c79
ci: use latest stable dockerfile syntax & rename docs Dockerfile ( #9711 )
...
* update dockerfiles to use latest stable syntax
Some Dockerfiles were pinned to a minor release, which meant they
wouldn't be updated to get the latest stable syntax (and fixes),
and one Dockerfile used the "labs" variant to use the HEREDOC syntax,
which has now been promoted to the stable syntax.
* docs: rename Dockerfile
There's no other Dockerfiles in the same path, so the "docs"
prefix was redundant.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-03 16:36:13 -04:00
Laura Brehm
c586ca4d0e
Change `projectOrName()` to check COMPOSE_PROJECT_NAME env var
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-03 18:39:39 +02:00
Laura Brehm
d2a6c2c200
Add E2E tests for `compose stop` with compose file
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-02 22:33:26 +02:00
Nicolas De Loof
f6e96dd783
if command is ran with a compose file, apply the compose model, not just project name
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-08-02 22:33:26 +02:00
Milas Bowman
765c071c89
up: do not stop dependency containers ( #9701 )
...
This keeps parity with v1, where only the containers explicitly
passed to `up` are torn down when `Ctrl-C` is hit, so any
dependencies that got launched (or orphan containers hanging
around) should not be touched.
Fixes #9696 .
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-02 15:25:59 -04:00
Guillaume Lours
052469104f
switch tests back to '_' separator for networks and volumes
...
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-08-01 17:25:43 +02:00
Ulysses Souza
c98e8ac3e1
Fix go.mod on replace for compose-go
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-29 20:49:10 +02:00