764efd360c
Hide stack trace shown on YAML parse error by default
...
Fixes https://github.com/containers/podman-compose/issues/1139
Signed-off-by: Yusuke Matsubara <whym@whym.org >
2025-06-30 15:33:25 +03:00
0cbf70a4e9
Implement short syntax for env variables in compose.yml "environment:"
...
This commit allows compose file to directly use environment variable
values in "environment:" section when variables were set in `.env` file.
This functionality was missing, as docker-compose supports both: short
and variable interpolation syntax forms:
environment:
- FOO
and
environment:
- FOO=${FOO}
Relevant docker-compose documentation:
https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/
podman-compose is more compatible with docker-compose after this change.
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-06-26 12:40:39 +03:00
dd471c8918
Fix dockerfile definition if directory name ends with ".git"
...
After changes in 92f0a8583a
, the
dockerfile parameter is igored if the (local) work directory's name ends
in `.git`.
This commit fixes the regression and adds more tests.
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-06-17 19:43:29 +03:00
4177bae807
Add docker_compose_compat setting
...
Signed-off-by: Uosis <uosisl+github@gmail.com >
2025-06-15 18:31:06 -06:00
6635b8b570
cleanup bool parsing
...
Signed-off-by: Uosis <uosisl+github@gmail.com >
2025-06-13 19:20:09 -06:00
8f55227167
add name_separator_compat
...
Signed-off-by: Uosis <uosisl+github@gmail.com >
2025-06-13 19:20:09 -06:00
605495233e
allow overriding x-podman using env vars
2025-06-11 22:27:45 +03:00
0491269f53
Fix relative host path resolution for volume bind mount source
...
e03d675b9b
broke relative host path
resolution by deleting os.chdir(). After this commit current working
directory is not relevant anymore.
Fixes e03d675b9b
.
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-06-05 16:46:07 +03:00
ee90712843
Merge pull request #1210 from jarovo/main
...
Add relabel option to secrets
2025-06-05 13:02:18 +03:00
82d7622c45
Add relabel option to secrets
...
On selinux enabled system, the secrets cannot be read without proper
relabeling or correct policy being set.
This patch enables user to instruc podman-copose to use :z or :Z podman
volume options to make podman relabel the file under bind-mount.
More info here:
https://unix.stackexchange.com/questions/728801/host-wide-consequences-of-setting-selinux-z-z-option-on-container-bind-mounts?rq=1
Signed-off-by: Jaroslav Henner <1187265+jarovo@users.noreply.github.com >
2025-06-05 00:13:58 +02:00
0b8b483cb7
Print full dockerfile path instead of context on error
...
Current error message does not provide the exact path where the
Dockerfile is being searched.
This commit distinguishes two types of errors when Dockerfile is not
found in build context:
- when the context does not have provided custom-named Dockerfile, the
path in the error message is absolute: "OSError: Dockerfile not found in
.../podman-compose/tests/integration/build_fail/context_no_file/custom-named-Dockerfile"
- when the context does not have any Dockerfile, the path in the error
message is: "OSError: Dockerfile not found in
.../podman-compose/tests/integration/build_fail/context_no_file"
Only this error message was used before the fix.
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
Co-authored-by: Siteshwar Vashisht <svashisht@redhat.com >
2025-05-28 16:19:38 +03:00
56238b10e3
tests/integration: Fix service_scale
tests
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-05-26 18:19:11 +03:00
d4ebf62e0e
tests/integration: Fix lifetime
tests
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-05-26 18:19:11 +03:00
83c7e9462e
tests/integration: Add missing __init__.py files to actually run tests
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-05-24 22:09:30 +03:00
1eae76ddca
Add return type annotations to test_utils.py
...
Signed-off-by: Povilas Kanapickas <povilas@radix.lt >
2025-05-24 17:19:29 +03:00
a3f48f830d
tests/integration: Add type annotations
...
Signed-off-by: Povilas Kanapickas <povilas@radix.lt >
2025-05-24 17:11:38 +03:00
dedb081550
tests/unit: Add type annotations
...
Signed-off-by: Povilas Kanapickas <povilas@radix.lt >
2025-05-24 17:11:36 +03:00
58df8497aa
Move tests to directories that can be imported
...
Signed-off-by: Povilas Kanapickas <povilas@radix.lt >
2025-05-24 16:47:49 +03:00
08d06df0f2
Fix build ssh path to be relative to directory of compose file
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-05-24 12:58:59 +03:00
a983129e88
tests/unit: Add unit tests for fixing CMD healthcheck
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-05-20 16:54:25 +03:00
225999eab1
tests: Rewrite test_normalize_depends_on to unittest
...
This test was forgotten about during initial migration.
Signed-off-by: Povilas Kanapickas <povilas@radix.lt >
2025-05-19 17:56:28 +03:00
3d47849d28
Allow specifying custom pod name in --in-pod
...
Fixes #958 : missing or incorrect use of --in-pod and pod-args
Fixes #693 : --in-pod 'name' no function
Signed-off-by: norbiros <norbiros@protonmail.com >
Signed-off-by: Norbiros <norbiros@protonmail.com >
2025-05-18 18:46:15 +03:00
0c1c4ffea9
Fix reset tag attribute to also reset depends_on
parameter
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-05-16 22:33:00 +03:00
6e30673260
tests/integration: Fix paths for testing override and reset tags
...
Tests were not run due to missing __init__.py files.
This commit adds missing files and fixes paths to compose.yaml files.
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-05-16 21:51:11 +03:00
67616bdaac
Handle exit code when compose up -d
...
Signed-off-by: Elsa <zeyugao@outlook.com >
2025-05-10 14:38:53 +03:00
7497692b19
Merge pull request #1184 from schnell18/main
...
Fix service_healthy condition enforcing
2025-05-10 14:20:06 +03:00
782c44d4c3
tests: Style cleanup
...
Signed-off-by: Justin Zhang <schnell18@gmail.com >
2025-05-10 14:12:28 +03:00
d7762a54f0
Fix service_healthy condition enforcing
...
Skip dependency health check to avoid compose-up hang for podman prior
to 4.6.0, which doesn't support --condition healthy.
Signed-off-by: Justin Zhang <schnell18@gmail.com >
2025-05-10 14:12:27 +03:00
abe5965c9a
tests: Improve reliability of network tests
...
The test did fail on my laptop with podman 5.4.1.
Signed-off-by: Justin Zhang <schnell18@gmail.com >
2025-05-10 14:10:22 +03:00
9e0da82726
Change compose-up to create then start container to avoid double exec
...
Signed-off-by: Justin Zhang <schnell18@gmail.com >
2025-05-10 13:58:23 +03:00
8638eb9b6d
tests: Test selected env variables to improve robustness
...
Signed-off-by: Justin Zhang <schnell18@gmail.com >
2025-05-10 13:46:26 +03:00
e1d938ffa6
Add --abort-on-container-failure
...
Signed-off-by: gtebbutt <5956226+gtebbutt@users.noreply.github.com >
2025-05-10 13:41:29 +03:00
1dab256cdd
tests/integration: Add override tag attribute test
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-04-30 23:37:05 +03:00
2a33ef5c79
tests/integration: Add override tag service test
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-04-30 23:37:05 +03:00
5ab734026c
tests/integration: Add reset tag attribute test
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-04-30 23:37:05 +03:00
35dc395483
tests/integration: Add reset tag service test
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-04-30 23:37:05 +03:00
38a9263424
integration/tests: Move 'volumes_merge' tests to 'merge' directory
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-04-30 23:37:05 +03:00
98f166d2e4
Implement pids_limit
...
Signed-off-by: Elsa <zeyugao@outlook.com >
2025-04-21 22:51:37 +03:00
8d899ebb65
Feature: add cpuset option
...
Signed-off-by: Romain Gasquet <romain.gasquet@neutron.fr >
2025-04-19 14:10:30 +02:00
342a39dcfe
Merge pull request #1179 from knarfS/fix_port_cmd
...
Fix port command
2025-04-14 18:05:53 +03:00
d6b8476573
Merge pull request #1180 from knarfS/add_rmi_arg
...
Add rmi argument for down command
2025-04-14 18:04:09 +03:00
ae41ef08c3
tests/integration: Improve tests for port command
...
Refs #778 and #1039
Signed-off-by: Frank Stettner <frank-stettner@gmx.net >
2025-04-10 07:51:39 +02:00
d80c31f578
tests/integration: Add tests for up and down command
...
Refs #387
Signed-off-by: Frank Stettner <frank-stettner@gmx.net >
2025-04-08 13:53:27 +02:00
fbc4c7da80
Integration tests for container scaling changes
...
Signed-off-by: Yashodhan Pise <technoy@gmail.com >
2025-04-08 01:42:03 +03:00
10a30ba24a
Merge pull request #1173 from mokibit/automate-ulimit-test
...
tests/integration: Automate manual `ulimit` test
2025-04-04 17:12:42 +03:00
a1be62fd31
tests/integration: Automate manual ulimit test
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-04-04 16:31:26 +03:00
e45b5d5063
tests/integration: Automate manual volumes_merge
test
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-04-04 15:22:45 +03:00
e04b8f3a60
tests/integration: Add integration test for buid git URL as context
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-03-30 21:56:55 +03:00
815450aba9
tests/unit: Add test for buid git URL as context
...
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-03-30 21:56:55 +03:00
92f0a8583a
Fix using git URL as build context
...
Podman-compose actually did not work with git URL as build context.
Signed-off-by: Monika Kairaityte <monika@kibit.lt >
2025-03-30 21:56:55 +03:00