Merge pull request #1372 from moreati/issue1118-ci-use-2025.02-images

CI: Use 2025.02 test images
pull/1370/head
Alex Willmer 1 week ago committed by GitHub
commit 5c9abeda94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -34,12 +34,12 @@ ANSIBLE_TESTS_HOSTS_DIR = os.path.join(GIT_ROOT, 'tests/ansible/hosts')
ANSIBLE_TESTS_TEMPLATES_DIR = os.path.join(GIT_ROOT, 'tests/ansible/templates')
DISTRO_SPECS = os.environ.get(
'MITOGEN_TEST_DISTRO_SPECS',
'centos6 centos8 debian9 debian11 ubuntu1604 ubuntu2004',
'centos6 centos8-py3 debian9 debian11 ubuntu1604 ubuntu2004',
)
IMAGE_PREP_DIR = os.path.join(GIT_ROOT, 'tests/image_prep')
IMAGE_TEMPLATE = os.environ.get(
'MITOGEN_TEST_IMAGE_TEMPLATE',
'ghcr.io/mitogen-hq/%(distro)s-test:2021',
'ghcr.io/mitogen-hq/%(distro)s-test:2025.02',
)
SUDOERS_DEFAULTS_SRC = './tests/image_prep/files/sudoers_defaults'
SUDOERS_DEFAULTS_DEST = '/etc/sudoers.d/mitogen_test_defaults'
@ -156,7 +156,15 @@ def run_batches(batches):
subprocess.Popen(combine(batch), shell=True)
for batch in batches
]
assert [proc.wait() for proc in procs] == [0] * len(procs)
for proc in procs:
proc.wait()
if proc.returncode:
print(
'proc: pid=%i rc=%i args=%r'
% (proc.pid, proc.returncode, proc.args),
file=sys.stderr, flush=True,
)
assert [proc.returncode for proc in procs] == [0] * len(procs)
def get_output(s, *args, **kwargs):
@ -231,7 +239,7 @@ def container_specs(
[{'distro': 'debian11',
'family': 'debian',
'hostname': 'localhost',
'image': 'ghcr.io/mitogen-hq/debian11-test:2021',
'image': 'ghcr.io/mitogen-hq/debian11-test:2025.02',
'index': 1,
'name': 'target-debian11-1',
'port': 2201,
@ -239,7 +247,7 @@ def container_specs(
{'distro': 'centos6',
'family': 'centos',
'hostname': 'localhost',
'image': 'ghcr.io/mitogen-hq/centos6-test:2021',
'image': 'ghcr.io/mitogen-hq/centos6-test:2025.02',
'index': 2,
'name': 'target-centos6-2',
'port': 2202,

@ -21,6 +21,8 @@ To avail of fixes in an unreleased version, please download a ZIP file
In progress (unreleased)
------------------------
* :gh:issue:`1118` CI: Use 2025.02 test images, keeping same OS releases
v0.3.33 (2025-11-22)
--------------------

@ -6,6 +6,7 @@
ansible_version_major_minor: "{{ ansible_version.major }}.{{ ansible_version.minor }}"
ansible_version_major_minor_patch: "{{ ansible_version.major }}.{{ ansible_version.minor }}.{{ ansible_version.revision | regex_search('^[0-9]+') }}"
become_doas_available: false
become_unpriv_available: >-
{#
Vanilla Ansible >= 4 (ansible-core >= 2.11) can use `setfacl` for

@ -1,3 +1,4 @@
become_doas_available: true
package_manager_keys:
- src: debian-archive-bullseye-automatic.gpg # Debian 11
dest: /etc/apt/trusted.gpg.d/debian-archive-bullseye-automatic.gpg

@ -15,12 +15,16 @@
changed_when: false
check_mode: false
register: doas_default_user
when:
- become_doas_available
- assert:
that:
- doas_default_user.stdout == 'root'
fail_msg:
doas_default_user={{ doas_default_user }}
when:
- become_doas_available
- name: Test doas -> mitogen__user1
become: true
@ -30,6 +34,7 @@
check_mode: false
register: doas_mitogen__user1
when:
- become_doas_available
- become_unpriv_available
- assert:
@ -38,6 +43,7 @@
fail_msg:
doas_mitogen__user1={{ doas_mitogen__user1 }}
when:
- become_doas_available
- become_unpriv_available
tags:
- doas
@ -61,12 +67,16 @@
changed_when: false
check_mode: false
register: fq_doas_default_user
when:
- become_doas_available
- assert:
that:
- fq_doas_default_user.stdout == 'root'
fail_msg:
fq_doas_default_user={{ fq_doas_default_user }}
when:
- become_doas_available
- name: Test community.general.doas -> mitogen__user1
become: true
@ -76,6 +86,7 @@
check_mode: false
register: fq_doas_mitogen__user1
when:
- become_doas_available
- become_unpriv_available
- assert:
@ -84,6 +95,7 @@
fail_msg:
fq_doas_mitogen__user1={{ fq_doas_mitogen__user1 }}
when:
- become_doas_available
- become_unpriv_available
tags:
- doas

@ -13,7 +13,7 @@
debian:
'9': /usr/bin/python
'10': /usr/bin/python3
'11': /usr/bin/python
'11': /usr/bin/python3
'NA': /usr/bin/python # Debian 11, Ansible <= 7 (ansible-core <= 2.14)
'bullseye/sid': /usr/bin/python # Debian 11, Ansible 8 - 9 (ansible-core 2.15 - 2.16)
ubuntu:
@ -29,7 +29,7 @@
debian:
'9': /usr/bin/python
'10': /usr/bin/python3
'11': /usr/bin/python3.9
'11': /usr/bin/python3
'NA': /usr/bin/python3.9 # Debian 11, Ansible <= 7 (ansible-core <= 2.14)
'bullseye/sid': /usr/bin/python3.9 # Debian 11, Ansible 8 - 9 (ansible-core 2.15 - 2.16)
ubuntu:

@ -8,9 +8,12 @@
- name: regression/issue_122__environment_difference.yml
hosts: test-targets
tasks:
- script: scripts/print_env.py
register: env
- debug: msg={{env}}
- name: Run print_env.py
script:
cmd: scripts/print_env.py
executable: "{{ ansible_python_interpreter | default(ansible_facts.discovered_interpreter_python) }}"
register: print_env_result
- debug:
var: print_env_result
tags:
- issue_122

@ -53,11 +53,11 @@ LOG = logging.getLogger(__name__)
DISTRO_SPECS = os.environ.get(
'MITOGEN_TEST_DISTRO_SPECS',
'centos6 centos8 debian9 debian11 ubuntu1604 ubuntu2004',
'centos6 centos8-py3 debian9 debian11 ubuntu1604 ubuntu2004',
)
IMAGE_TEMPLATE = os.environ.get(
'MITOGEN_TEST_IMAGE_TEMPLATE',
'ghcr.io/mitogen-hq/%(distro)s-test:2021',
'ghcr.io/mitogen-hq/%(distro)s-test:2025.02',
)
TESTS_DIR = os.path.join(os.path.dirname(__file__))

@ -123,10 +123,11 @@ setenv =
ans{2.10,3,4,5}: ANSIBLE_STDOUT_CALLBACK=yaml
# Print warning on the first occurence at each module:linenno in Mitogen. Available Python 2.7, 3.2+.
PYTHONWARNINGS=default:::ansible_mitogen,default:::mitogen
ans{2.10,3,4,5}: MITOGEN_TEST_DISTRO_SPECS=centos6 centos8-py3 debian9 debian11 ubuntu1604 ubuntu2004
# Ansible 6 - 8 (ansible-core 2.13 - 2.15) require Python 2.7 or >= 3.5 on targets
ans{6,7,8}: MITOGEN_TEST_DISTRO_SPECS=centos7 centos8 debian9 debian10 debian11 ubuntu1604 ubuntu1804 ubuntu2004
ans{6,7,8}: MITOGEN_TEST_DISTRO_SPECS=centos7 centos8-py3 debian9 debian10 debian11 ubuntu1604 ubuntu1804 ubuntu2004
# Ansible 9 (ansible-core 2.16) requires Python 2.7 or >= 3.6 on targets
ans9: MITOGEN_TEST_DISTRO_SPECS=centos7 centos8 debian9 debian10 debian11 ubuntu1804 ubuntu2004
ans9: MITOGEN_TEST_DISTRO_SPECS=centos7 centos8-py3 debian9 debian10 debian11 ubuntu1804 ubuntu2004
# Ansible 10 (ansible-core 2.17) requires Python >= 3.7 on targets
ans10: MITOGEN_TEST_DISTRO_SPECS=debian10-py3 debian11-py3 ubuntu2004-py3
# Ansible 11 (ansible-core 2.18) requires Python >= 3.8 on targets
@ -134,11 +135,11 @@ setenv =
ans12: MITOGEN_TEST_DISTRO_SPECS=debian11-py3 ubuntu2004-py3
# Ansible 13 (ansible-core 2.20) requires Python >= 3.9 on targets
ans13: MITOGEN_TEST_DISTRO_SPECS=debian11-py3
distros_centos: MITOGEN_TEST_DISTRO_SPECS=centos6 centos7 centos8
distros_centos: MITOGEN_TEST_DISTRO_SPECS=centos6 centos7 centos8-py3
distros_centos5: MITOGEN_TEST_DISTRO_SPECS=centos5
distros_centos6: MITOGEN_TEST_DISTRO_SPECS=centos6
distros_centos7: MITOGEN_TEST_DISTRO_SPECS=centos7
distros_centos8: MITOGEN_TEST_DISTRO_SPECS=centos8
distros_centos8: MITOGEN_TEST_DISTRO_SPECS=centos8-py3
distros_debian: MITOGEN_TEST_DISTRO_SPECS=debian9 debian10 debian11
distros_debian9: MITOGEN_TEST_DISTRO_SPECS=debian9
distros_debian10: MITOGEN_TEST_DISTRO_SPECS=debian10

Loading…
Cancel
Save