Commit Graph

179 Commits

Author SHA1 Message Date
Felix Fontein
bc1730667b Remove CI scripts. 2024-10-20 11:11:55 +02:00
patchback[bot]
8d0c8252a5
Fix typo in Docker connection tests. (#964) (#965)
Co-authored-by: x4e-jonas <x4e-jonas@users.noreply.github.com>
(cherry picked from commit d8cefc4190)

Co-authored-by: x4e-jonas <83283569+x4e-jonas@users.noreply.github.com>
2024-09-09 15:31:42 +02:00
Felix Fontein
58cf4e6568
Use registry image from ghcr.io. (#928) 2024-07-08 20:39:05 +02:00
patchback[bot]
31733dbbe6
Fix CI for CentOS 7. (#908) (#909)
(cherry picked from commit 1713995bfc)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-07-01 14:03:27 +02:00
patchback[bot]
3079acffc1
Support ansible-test integration tests for arm64 (#906) (#907)
* Support ansible-test integration for arm64

* Replace set_fact with inline templated conditional

(cherry picked from commit d98850e9e9)

Co-authored-by: Andrew Dawes <53574062+AndrewJDawes@users.noreply.github.com>
2024-06-30 14:19:15 +02:00
Felix Fontein
e553b88af5
Fix typo. (#904) 2024-06-29 19:12:12 +02:00
patchback[bot]
2c369c9eb3
Make sure that Docker SDK for Python is installed for docker_stack* tests. (#896) (#898)
(cherry picked from commit ace4ee4f70)

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-06-28 16:52:26 +02:00
Felix Fontein
f74e25eef2
Skip certain tests on Docker 27.0.0+. (#893) (#894)
(cherry picked from commit 08063a0439)
2024-06-28 09:40:54 +02:00
Felix Fontein
d0aee07ab0
Docker Compose v1 tests: restrict API version to 1.44 if default API version is 1.45+ (#881) (#883)
* Restrict API version to 1.44 if default API version is 1.45+.

* Set COMPOSE_API_VERSION if api_version is provided.

* Add changelog.

(cherry picked from commit 691bc6de72)
2024-06-14 08:25:11 +02:00
Felix Fontein
b4e0ba9e5e
[stable-2] Fix docker_image tests with Docker SDK for Python 7.1.0; restrict requests in EE dependencies to < 2.32.0 (#872)
* Docker SDK for Python 7.1.0 also dropped support for API versions < 1.24.

* EE: restrict requests to < 2.32.0.
2024-05-26 19:43:47 +02:00
Felix Fontein
e2e1bc796b
Prevent RCE via inventory plugins (#815) (#818)
* Prevent RCE via inventory plugins.

* Do not make ansible_connection unsafe.

* Add test.

(cherry picked from commit bf1281ae7f)
2024-03-14 22:09:57 +01:00
Felix Fontein
5cddffa8bb
[stable-2] Fix/improve inventory integration tests (#819)
* Improve inventory integration tests. (#817)

(cherry picked from commit 14e2f92974)

* Fix Python deps setup in callback/inventory tests. (#816)

(cherry picked from commit 6600f501ae)
2024-03-14 21:14:33 +01:00
Felix Fontein
3cdbeda34f
Fix tests for Moby 25.0.0. (#769) 2024-01-20 17:43:07 +01:00
Felix Fontein
58036e5092
mac_address no longer works with Docker API v1.44+. (#764) (#768)
(cherry picked from commit 648e0652d5)
2024-01-20 14:27:04 +01:00
Felix Fontein
e501ed2c59
Adjust to new shellcheck in ansible-core devel's sanity tests. (#741) (#742)
(cherry picked from commit 5256f94342)
2024-01-04 22:43:38 +01:00
Felix Fontein
5e96be6c39
Compose digest instead of accidentally using wrong one. (#733) (#734)
(cherry picked from commit 42453444ff)
2023-12-31 15:43:12 +01:00
Felix Fontein
1e286852b2
[stable-2] Integration tests: split up Docker setup, move docker_compose tests into own group (#719)
* Rename setup role.

* Create new CI group 6, and move docker_compose v1 tests into there.

* Split up Docker setup in integration tests.

* Change setup_docker_compose_v1 to install its own Docker SDK for Python.

* Restrict Docker SDK for Python to < 7.0.0 in EE.
2023-12-09 18:38:54 +01:00
Felix Fontein
4e172e3111
Fix bad expressions in tests. (#711) (#712)
ci_complete

(cherry picked from commit b8afdc52b1)
2023-11-28 23:11:24 +01:00
Felix Fontein
df37b4142f Stick to pre-semantic-markup version. 2023-11-12 11:25:55 +01:00
patchback[bot]
dd9aeac0bd
Force PyYAML to 5.3.1. (#669) (#670)
(cherry picked from commit 017536953a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-19 16:50:45 +02:00
Felix Fontein
84fc4ca30b
SuSE: install docker-compose v1 from pip instead of system packages. (#650) (#651)
The system package switched to docker-compose v2.

(cherry picked from commit 3f9f41e5a9)
2023-06-20 08:26:54 +02:00
Felix Fontein
c68d90de76
Switch to Ansible Galaxy compatible requirements files for tests. (#633) (#634)
(cherry picked from commit 74b70f81c8)
2023-05-21 14:55:16 +02:00
Felix Fontein
4aa9c55dd6 Until Docker SDK for Python is fixed, add constraints on urllib3 and requests. 2023-05-04 07:24:16 +02:00
patchback[bot]
ae0d53811a
Do extra docs validation; explicitly disallow semantic markup in docs (#607) (#608)
* Do extra docs validation. Explicitly disallow semantic markup in docs.

* Forgot to add new requirement.

* Improve test.

* TEMP - make CI fail.

* Revert "TEMP - make CI fail."

This reverts commit d381f1a431.

* Remove unnecessary import.

* Make sure ANSIBLE_COLLECTIONS_PATH is set.

* Make sure sanity tests from older Ansible versions don't complain.

(cherry picked from commit 9e1a0a6fb8)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-16 19:04:45 +02:00
patchback[bot]
88fb666d41
More true/false normalization. (#597) (#598)
(cherry picked from commit d0a3e587a5)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-06 22:36:33 +01:00
Felix Fontein
94227e2575
docker_prune: correctly return 'changed' result (#593) (#594)
* Correctly return 'changed' status.

* Extend tests.

* Fix typo.

(cherry picked from commit 08bfcf7e5f)
2023-02-24 21:24:39 +01:00
Felix Fontein
8e99d0c4da
Remove unnecessary test imports. (#583) (#584)
(cherry picked from commit 449b91d489)
2023-02-12 21:29:50 +01:00
Felix Fontein
ec4c17efef
CI: Make tests work with Docker API version 1.42 (#576) (#577)
* Make tests work with API version 1.42.

* Make sure anonymous volume is separated from container a bit earlier.

* Another try.

(cherry picked from commit 3a1bfc4be2)
2023-02-04 22:31:15 +01:00
Felix Fontein
e418fe59d8
Looks like BuilderSize was never documented and eventually got removed. Replace with something that is documented (https://docs.docker.com/engine/api/v1.42/#tag/System/operation/SystemDataUsage). (#569) (#571)
(cherry picked from commit d57b26269a)
2023-02-03 12:48:26 +01:00
patchback[bot]
41b1337d8e
[PR #563/c0d9ca67 backport][stable-2] Fix CI (#565)
* Restrict to old enough paramiko on RHEL 8 or other systems using Python 3.6. (#563)

(cherry picked from commit c0d9ca67c4)

* Make sure paramiko is installed on localhost as well.

* Revert "Make sure paramiko is installed on localhost as well."

This reverts commit f36406c2db.

* Fix check.

* ...

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-22 19:06:56 +01:00
Felix Fontein
5ffba04ef0 Don't uninstall docker. 2023-01-14 11:16:57 +01:00
Felix Fontein
e7aa5dcdec CI: improve Docker setup (#550)
* Cache has already been updated a few lines before.

* When skipping Docker cleanup, create flag to avoid the expensive part of the setup (including package manager cache update) to be run again.

(cherry picked from commit 134d32cae6)
2023-01-13 21:05:54 +01:00
Felix Fontein
0ffa3cc1d2
docker_plugin: do not crash when plugin doesn't exist (#553) (#556)
* Do not crash when plugin doesn't exist.

* Improve style.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
(cherry picked from commit c7cbec0163)
2023-01-13 21:00:34 +01:00
patchback[bot]
098a77fe4c
Handle ansible_default_ipv4 not there in tests. (#514) (#515)
(cherry picked from commit 6e04e1f172)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-12-01 00:11:38 +01:00
Felix Fontein
3da9aa3b9c
[stable-2] Make current_container_facts work with newer Docker versions and latest ansible-test container changes (#512)
* Make current_container_facts work with newer Docker versions and latest ansible-test container changes (#510)

* Add more debug output.

* Add basic integration test.

* Split into lines.

* Fix docker detection, add podman detection.

ci_complete

* Improve regular expression.

* Document that this module is trying its best, but might not be perfect.

* Update comment.

(cherry picked from commit c2d84efccb)

* Remove new feature (podman support).
2022-11-30 23:01:30 +01:00
Felix Fontein
94e0acf523
Add tests for build.args. (#457) 2022-08-16 13:47:12 +02:00
Felix Fontein
bd62f82ca5
Fix docker_container tty test. (#444) 2022-08-11 22:08:34 +02:00
patchback[bot]
4d0f00db3c
Adjust to b1dd2af4ca. (#423) (#425)
(cherry picked from commit c00b4ec9be)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-12 17:12:48 +02:00
patchback[bot]
ff242fab8e
Fix tests on Ubuntu 22.04 (#419) (#420)
* Try to fix tests on Ubuntu 22.04.

* Let Ansible handle the apt repo install.

(cherry picked from commit f6d4cad46e)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-08 07:23:15 +02:00
Felix Fontein
57e19ca596 Revert "Remove deprecations from docker_container, bump collection version to 3.0.0 (#399)"
This reverts commit 49ce0a3cb1.
2022-07-02 14:18:48 +02:00
Felix Fontein
49ce0a3cb1
Remove deprecations from docker_container, bump collection version to 3.0.0 (#399)
* Remove deprecated features in docker_container.

* Bump collection version to 3.0.0.

* Remove 'published_ports: all' tests.
2022-07-01 19:16:22 +02:00
Felix Fontein
f41d7ac1b8
Move common utility code to plugins.module_utils.util (#390)
* Move common utility code to plugins.module_utils.util.

* Also adjust plugins.

* Fix import.
2022-06-20 18:39:13 +02:00
Felix Fontein
b3b543dd8d
requests drops support for older Python. (#380) 2022-06-11 18:14:18 +00:00
Felix Fontein
2080c63f05
Try to fix tests. (#374)
ci_complete
2022-05-24 12:49:22 +02:00
Rodrigo Candido Gryzinski
497c2fda91
Add image_label_mismatch parameter to docker_container (#370)
* Add image_label_mismatch to docker_container

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Test image_label_mismatch error message

* Add change fragment for image_label_mismatch

* Break long line in docker_container.py for pep-8 compliance

* pep8 compliance

* Update changelogs/fragments/370-add-image-label-mismatch.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* fix: add expected_labels to parameters_map in docker_container

* Apply suggestions from code review

* Apply suggestions from code review

* Update tests/integration/targets/docker_container/tasks/tests/options.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-24 08:35:33 +02:00
Felix Fontein
b32d40f714
Try pull with digest in tests. (#366) 2022-05-23 12:21:23 +02:00
Felix Fontein
401a76ff00
docker_container: fail if there are too many parts in a parsed port (#367)
* Fail if there are too many parts in a parsed port.

* Add tests.

* Prevent bad parsing.
2022-05-22 17:20:05 +02:00
Felix Fontein
ab2d33aa99
CI: Replace the container used in the nsenter tests (#368)
* Replace the container used in the nsenter tests.

* Improve connection tests.g

* Use quay.io/ansible/ansible-runner:devel instead.
2022-05-21 16:53:09 +02:00
Felix Fontein
cfc6fb9d40
Add RHEL 9.0, Ubuntu 22.04 and Fedora 36 to CI (#358)
* Add RHEL 9.0 to CI.

* Add RHEL 9 specific files.

* Add Ubuntu 22.04 and Fedora 36 to CI.

* Another try.

* Adjust kernel memory tests.

* Add more details.

* RHEL 9 doesn't support setting memory swappiness.

* Fix docker_swarm_service tests.

The 'less' case should always have been changed, but it probably was always skipped
due to a too old Docker SDK for Python or a too old Docker daemon.

* More checks / improve checks.
2022-05-20 16:27:13 +02:00
Felix Fontein
9c7415e0e7
certifi dropped Python 2 support. (#356) 2022-05-19 07:17:28 +02:00