Debian Codegraph @

ansible_collections/community/docker/antsibull-nox.toml

raw
1 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 # SPDX-FileCopyrightText: 2025 Felix Fontein <[email protected]>
4
5 [collection_sources]
6 "ansible.posix" = "git+https://github.com/ansible-collections/ansible.posix.git,main"
7 "community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,main"
8 "community.general" = "git+https://github.com/ansible-collections/community.general.git,main"
9 "community.internal_test_tools" = "git+https://github.com/ansible-collections/community.internal_test_tools.git,main"
10 "community.library_inventory_filtering_v1" = "git+https://github.com/ansible-collections/community.library_inventory_filtering.git,stable-1"
11
12 [vcs]
13 vcs = "git"
14 development_branch = "main"
15 stable_branches = [ "stable-*" ]
16
17 [sessions]
18
19 [sessions.lint]
20 run_isort = false
21 run_black = true
22 run_ruff_autofix = true
23 ruff_autofix_config = "ruff.toml"
24 ruff_autofix_select = [
25 "I",
26 "RUF022",
27 ]
28 run_ruff_check = true
29 ruff_check_config = "ruff.toml"
30 run_flake8 = true
31 flake8_config = ".flake8"
32 run_pylint = true
33 pylint_rcfile = ".pylintrc"
34 run_yamllint = true
35 yamllint_config = ".yamllint"
36 yamllint_config_plugins = ".yamllint-docs"
37 yamllint_config_plugins_examples = ".yamllint-examples"
38 run_mypy = true
39 mypy_ansible_core_package = "ansible-core>=2.19.0"
40 mypy_config = ".mypy.ini"
41 mypy_extra_deps = [
42 "docker",
43 "paramiko",
44 "urllib3",
45 "requests",
46 "types-mock",
47 "types-paramiko",
48 "types-pywin32",
49 "types-PyYAML",
50 "types-requests",
51 ]
52
53 [sessions.docs_check]
54 validate_collection_refs="all"
55 codeblocks_restrict_types = [
56 "ansible-output",
57 "console",
58 "yaml",
59 "yaml+jinja",
60 ]
61 codeblocks_restrict_type_exact_case = true
62 codeblocks_allow_without_type = false
63 codeblocks_allow_literal_blocks = false
64
65 [sessions.license_check]
66
67 [sessions.extra_checks]
68 run_no_unwanted_files = true
69 no_unwanted_files_module_extensions = [".py"]
70 no_unwanted_files_yaml_extensions = [".yml"]
71 run_action_groups = true
72 run_no_trailing_whitespace = true
73 run_avoid_characters = true
74
75 [[sessions.extra_checks.action_groups_config]]
76 name = "docker"
77 pattern = "^.*$"
78 exclusions = [
79 "current_container_facts",
80 "docker_context_info",
81 ]
82 doc_fragment = "community.docker._attributes.actiongroup_docker"
83
84 [[sessions.extra_checks.avoid_character_group]]
85 name = "tab"
86 regex = "\\x09"
87 skip_directories = [
88 "tests/images/",
89 ]
90
91 [sessions.build_import_check]
92 run_galaxy_importer = true
93
94 [sessions.ansible_test_sanity]
95 include_devel = true
96
97 [sessions.ansible_test_units]
98 include_devel = true
99
100 [sessions.ansible_test_integration]
101 session_name_template = "ansible-test-integration-{ansible_core}{dash_docker_short}{dash_remote}{dash_python_version}{dash_target_dashized}"
102 display_name_template = "main+Ⓐ{ansible_core}{plus_docker_short}{plus_remote}{plus_py_python_version}{plus_target}{plus_force_docker_sdk_for_python_dev}{plus_force_docker_sdk_for_python_pypi}"
103 description_template = "Run main integration tests with ansible-core {ansible_core}{comma_docker_short}{comma_remote}{comma_py_python_version}{comma_target}{comma_force_docker_sdk_for_python_dev}{comma_force_docker_sdk_for_python_pypi}"
104
105 [sessions.ansible_test_integration.ansible_vars]
106 force_docker_sdk_for_python_dev = { type = "value", value = false, template_value = "" }
107 force_docker_sdk_for_python_pypi = { type = "value", value = false, template_value = "" }
108
109 ##################################################################################################
110
111 # Ansible-core 2.17:
112
113 [[sessions.ansible_test_integration.groups]]
114 session_name = "ansible-test-integration-2.17"
115 description = "Meta session for running all ansible-test-integration-2.17-* sessions."
116
117 [[sessions.ansible_test_integration.groups.sessions]]
118 ansible_core = "2.17"
119 target = [ "azp/4/", "azp/5/" ]
120 docker = [ "fedora39", "ubuntu2004", "alpine319" ]
121
122 [[sessions.ansible_test_integration.groups.sessions]]
123 ansible_core = "2.17"
124 target = [ "azp/1/", "azp/2/", "azp/3/", "azp/4/", "azp/5/" ]
125 remote = [ "rhel/9.3" ]
126
127 # Ansible-core 2.18:
128
129 [[sessions.ansible_test_integration.groups]]
130 session_name = "ansible-test-integration-2.18"
131 description = "Meta session for running all ansible-test-integration-2.18-* sessions."
132
133 [[sessions.ansible_test_integration.groups.sessions]]
134 ansible_core = "2.18"
135 target = [ "azp/4/", "azp/5/" ]
136 docker = [ "fedora40", "ubuntu2204", "alpine320" ]
137
138 [[sessions.ansible_test_integration.groups.sessions]]
139 ansible_core = "2.18"
140 target = [ "azp/1/", "azp/2/", "azp/3/", "azp/4/", "azp/5/" ]
141 remote = [ "rhel/9.7" ]
142
143 # Ansible-core 2.19:
144
145 [[sessions.ansible_test_integration.groups]]
146 session_name = "ansible-test-integration-2.19"
147 description = "Meta session for running all ansible-test-integration-2.19-* sessions."
148
149 [[sessions.ansible_test_integration.groups.sessions]]
150 ansible_core = "2.19"
151 target = [ "azp/4/", "azp/5/" ]
152 docker = [ "fedora41", "alpine321" ]
153
154 [[sessions.ansible_test_integration.groups.sessions]]
155 ansible_core = "2.19"
156 target = [ "azp/1/", "azp/2/", "azp/3/", "azp/4/", "azp/5/" ]
157 remote = [ "ubuntu/22.04" ]
158
159 # Ansible-core 2.20:
160
161 [[sessions.ansible_test_integration.groups]]
162 session_name = "ansible-test-integration-2.20"
163 description = "Meta session for running all ansible-test-integration-2.20-* sessions."
164
165 [[sessions.ansible_test_integration.groups.sessions]]
166 ansible_core = "2.20"
167 target = [ "azp/4/", "azp/5/" ]
168 docker = [ "fedora42", "alpine322" ]
169
170 [[sessions.ansible_test_integration.groups.sessions]]
171 ansible_core = "2.20"
172 target = [ "azp/1/", "azp/2/", "azp/3/", "azp/4/", "azp/5/" ]
173 remote = [ "rhel/9.7" ]
174
175 # Ansible-core 2.21:
176
177 [[sessions.ansible_test_integration.groups]]
178 session_name = "ansible-test-integration-2.21"
179 description = "Meta session for running all ansible-test-integration-2.21-* sessions."
180
181 [[sessions.ansible_test_integration.groups.sessions]]
182 ansible_core = "2.21"
183 target = [ "azp/4/", "azp/5/" ]
184 docker = [ "fedora43", "ubuntu2404" ]
185
186 [[sessions.ansible_test_integration.groups.sessions]]
187 ansible_core = "2.21"
188 target = [ "azp/1/", "azp/2/", "azp/3/", "azp/4/", "azp/5/" ]
189 remote = [ "rhel/10.1" ]
190
191 # Ansible-core devel:
192
193 [[sessions.ansible_test_integration.groups]]
194 session_name = "ansible-test-integration-devel"
195 description = "Meta session for running all ansible-test-integration-devel-* sessions."
196
197 [[sessions.ansible_test_integration.groups.sessions]]
198 ansible_core = "devel"
199 target = [ "azp/4/", "azp/5/" ]
200 docker = [ "fedora43", "ubuntu2204", "ubuntu2404", "alpine323" ]
201
202 [[sessions.ansible_test_integration.groups.sessions]]
203 ansible_core = "devel"
204 target = [ "azp/4/", "azp/5/" ]
205 python_version = "3.9"
206 docker = "quay.io/ansible-community/test-image:debian-bullseye"
207
208 [[sessions.ansible_test_integration.groups.sessions]]
209 ansible_core = "devel"
210 target = [ "azp/4/", "azp/5/" ]
211 python_version = "3.11"
212 docker = "quay.io/ansible-community/test-image:debian-bookworm"
213
214 [[sessions.ansible_test_integration.groups.sessions]]
215 ansible_core = "devel"
216 target = [ "azp/4/", "azp/5/" ]
217 python_version = "3.13"
218 docker = "quay.io/ansible-community/test-image:debian-13-trixie"
219
220 [[sessions.ansible_test_integration.groups.sessions]]
221 ansible_core = "devel"
222 target = [ "azp/4/", "azp/5/" ]
223 python_version = "3.14"
224 docker = "quay.io/ansible-community/test-image:archlinux"
225
226 [[sessions.ansible_test_integration.groups.sessions]]
227 ansible_core = "devel"
228 target = [ "azp/1/", "azp/2/", "azp/3/", "azp/4/", "azp/5/" ]
229 remote = [ "rhel/10.1" ]
230 ansible_vars = { force_docker_sdk_for_python_dev = { type = "value", value = true, template_value = "sdk-dev-latest" } }
231
232 [[sessions.ansible_test_integration.groups.sessions]]
233 ansible_core = "devel"
234 target = [ "azp/1/", "azp/2/", "azp/3/", "azp/4/", "azp/5/" ]
235 remote = [
236 "rhel/9.7",
237 # For some reason, Ubuntu 24.04 is *extremely* slower than RHEL 9.6
238 # "ubuntu/24.04",
239 ]
240
241 ##################################################################################################
242
243 [sessions.ansible_lint]
244
245 [[sessions.ee_check.execution_environments]]
246 name = "devel-ubi-9"
247 description = "ansible-core devel @ RHEL UBI 9"
248 test_playbooks = ["tests/ee/all.yml"]
249 config.images.base_image.name = "docker.io/redhat/ubi9:latest"
250 config.dependencies.ansible_core.package_pip = "https://github.com/ansible/ansible/archive/devel.tar.gz"
251 config.dependencies.ansible_runner.package_pip = "ansible-runner"
252 config.dependencies.python_interpreter.package_system = "python3.12 python3.12-pip python3.12-wheel python3.12-cryptography"
253 config.dependencies.python_interpreter.python_path = "/usr/bin/python3.12"
254 runtime_environment = {"ANSIBLE_PRIVATE_ROLE_VARS" = "true"}
255 runtime_container_options = [
256 # Mount Docker socket into the container so we can talk to Docker outside the container
257 "-v",
258 "/var/run/docker.sock:/var/run/docker.sock",
259 # Need to be root so we can access /var/run/docker.sock, which usually isn't accessible by the user,
260 # but only by the group the user is in (but that group membership isn't there in the container)
261 "--user",
262 "0",
263 ]
264
265 [[sessions.ee_check.execution_environments]]
266 name = "2.17-rocky-9"
267 description = "ansible-core 2.17 @ Rocky Linux 9"
268 test_playbooks = ["tests/ee/all.yml"]
269 config.images.base_image.name = "quay.io/rockylinux/rockylinux:9"
270 config.dependencies.ansible_core.package_pip = "https://github.com/ansible/ansible/archive/stable-2.17.tar.gz"
271 config.dependencies.ansible_runner.package_pip = "ansible-runner"
272 config.dependencies.python_interpreter.package_system = "python3.11 python3.11-pip python3.11-wheel python3.11-cryptography"
273 config.dependencies.python_interpreter.python_path = "/usr/bin/python3.11"
274 runtime_environment = {"ANSIBLE_PRIVATE_ROLE_VARS" = "true"}
275 runtime_container_options = [
276 # Mount Docker socket into the container so we can talk to Docker outside the container
277 "-v",
278 "/var/run/docker.sock:/var/run/docker.sock",
279 # Need to be root so we can access /var/run/docker.sock, which usually isn't accessible by the user,
280 # but only by the group the user is in (but that group membership isn't there in the container)
281 "--user",
282 "0",
283 ]