mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-25 01:04:28 +00:00
Merge "CI: Run jobs for all non-EOL Ansible versions"
This commit is contained in:
73
.zuul.yaml
73
.zuul.yaml
@@ -212,17 +212,42 @@
|
|||||||
branches: master
|
branches: master
|
||||||
description: |
|
description: |
|
||||||
Run openstack collections functional tests against a master devstack
|
Run openstack collections functional tests against a master devstack
|
||||||
using master of openstacksdk and stable 2.16 branch of ansible
|
using master of openstacksdk and stable 2.18 branch of ansible
|
||||||
required-projects:
|
required-projects:
|
||||||
- name: github.com/ansible/ansible
|
- name: github.com/ansible/ansible
|
||||||
override-checkout: stable-2.18
|
override-checkout: stable-2.18
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: ansible_2_18
|
tox_envlist: ansible_2_18
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: ansible-collections-openstack-functional-devstack-ansible-2.19
|
||||||
|
parent: ansible-collections-openstack-functional-devstack-base
|
||||||
|
branches: master
|
||||||
|
description: |
|
||||||
|
Run openstack collections functional tests against a master devstack
|
||||||
|
using master of openstacksdk and stable 2.19 branch of ansible
|
||||||
|
required-projects:
|
||||||
|
- name: github.com/ansible/ansible
|
||||||
|
override-checkout: stable-2.19
|
||||||
|
vars:
|
||||||
|
tox_envlist: ansible_2_19
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: ansible-collections-openstack-functional-devstack-ansible-2.20
|
||||||
|
parent: ansible-collections-openstack-functional-devstack-base
|
||||||
|
branches: master
|
||||||
|
description: |
|
||||||
|
Run openstack collections functional tests against a master devstack
|
||||||
|
using master of openstacksdk and stable 2.20 branch of ansible
|
||||||
|
required-projects:
|
||||||
|
- name: github.com/ansible/ansible
|
||||||
|
override-checkout: stable-2.20
|
||||||
|
vars:
|
||||||
|
tox_envlist: ansible_2_20
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: ansible-collections-openstack-functional-devstack-ansible-devel
|
name: ansible-collections-openstack-functional-devstack-ansible-devel
|
||||||
parent: ansible-collections-openstack-functional-devstack-base
|
parent: ansible-collections-openstack-functional-devstack-base
|
||||||
nodeset: openstack-single-node-jammy
|
|
||||||
branches: master
|
branches: master
|
||||||
description: |
|
description: |
|
||||||
Run openstack collections functional tests against a master devstack
|
Run openstack collections functional tests against a master devstack
|
||||||
@@ -251,13 +276,13 @@
|
|||||||
- job:
|
- job:
|
||||||
name: openstack-tox-linters-ansible-devel
|
name: openstack-tox-linters-ansible-devel
|
||||||
parent: openstack-tox-linters-ansible
|
parent: openstack-tox-linters-ansible
|
||||||
nodeset: ubuntu-jammy
|
nodeset: ubuntu-noble
|
||||||
description: |
|
description: |
|
||||||
Run openstack collections linter tests using the devel branch of ansible
|
Run openstack collections linter tests using the devel branch of ansible
|
||||||
# non-voting because we can't prevent ansible devel from breaking us
|
# non-voting because we can't prevent ansible devel from breaking us
|
||||||
voting: false
|
voting: false
|
||||||
vars:
|
vars:
|
||||||
python_version: '3.10'
|
python_version: '3.12'
|
||||||
bindep_profile: test py310
|
bindep_profile: test py310
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
@@ -273,10 +298,36 @@
|
|||||||
python_version: "3.12"
|
python_version: "3.12"
|
||||||
bindep_profile: test py312
|
bindep_profile: test py312
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-tox-linters-ansible-2.19
|
||||||
|
parent: openstack-tox-linters-ansible
|
||||||
|
description: |
|
||||||
|
Run openstack collections linter tests using the 2.19 branch of ansible
|
||||||
|
required-projects:
|
||||||
|
- name: github.com/ansible/ansible
|
||||||
|
override-checkout: stable-2.19
|
||||||
|
vars:
|
||||||
|
tox_envlist: linters_2_19
|
||||||
|
python_version: "3.12"
|
||||||
|
bindep_profile: test py312
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-tox-linters-ansible-2.20
|
||||||
|
parent: openstack-tox-linters-ansible
|
||||||
|
description: |
|
||||||
|
Run openstack collections linter tests using the 2.20 branch of ansible
|
||||||
|
required-projects:
|
||||||
|
- name: github.com/ansible/ansible
|
||||||
|
override-checkout: stable-2.20
|
||||||
|
vars:
|
||||||
|
tox_envlist: linters_2_20
|
||||||
|
python_version: "3.12"
|
||||||
|
bindep_profile: test py312
|
||||||
|
|
||||||
# Cross-checks with other projects
|
# Cross-checks with other projects
|
||||||
- job:
|
- job:
|
||||||
name: bifrost-collections-src
|
name: bifrost-collections-src
|
||||||
parent: bifrost-integration-on-ubuntu-jammy
|
parent: bifrost-integration-on-ubuntu-noble
|
||||||
required-projects:
|
required-projects:
|
||||||
- openstack/ansible-collections-openstack
|
- openstack/ansible-collections-openstack
|
||||||
- # always use master branch when collecting parent job variants, refer to git blame for rationale.
|
- # always use master branch when collecting parent job variants, refer to git blame for rationale.
|
||||||
@@ -287,7 +338,7 @@
|
|||||||
override-checkout: master
|
override-checkout: master
|
||||||
- job:
|
- job:
|
||||||
name: bifrost-keystone-collections-src
|
name: bifrost-keystone-collections-src
|
||||||
parent: bifrost-integration-keystone-on-ubuntu-jammy
|
parent: bifrost-integration-keystone-on-ubuntu-noble
|
||||||
required-projects:
|
required-projects:
|
||||||
- openstack/ansible-collections-openstack
|
- openstack/ansible-collections-openstack
|
||||||
- # always use master branch when collecting parent job variants, refer to git blame for rationale.
|
- # always use master branch when collecting parent job variants, refer to git blame for rationale.
|
||||||
@@ -326,9 +377,13 @@
|
|||||||
- tox-pep8
|
- tox-pep8
|
||||||
- openstack-tox-linters-ansible-devel
|
- openstack-tox-linters-ansible-devel
|
||||||
- openstack-tox-linters-ansible-2.18
|
- openstack-tox-linters-ansible-2.18
|
||||||
|
- openstack-tox-linters-ansible-2.19
|
||||||
|
- openstack-tox-linters-ansible-2.20
|
||||||
- ansible-collections-openstack-functional-devstack
|
- ansible-collections-openstack-functional-devstack
|
||||||
- ansible-collections-openstack-functional-devstack-releases
|
- ansible-collections-openstack-functional-devstack-releases
|
||||||
- ansible-collections-openstack-functional-devstack-ansible-2.18
|
- ansible-collections-openstack-functional-devstack-ansible-2.18
|
||||||
|
- ansible-collections-openstack-functional-devstack-ansible-2.19
|
||||||
|
- ansible-collections-openstack-functional-devstack-ansible-2.20
|
||||||
- ansible-collections-openstack-functional-devstack-ansible-devel
|
- ansible-collections-openstack-functional-devstack-ansible-devel
|
||||||
- ansible-collections-openstack-functional-devstack-magnum
|
- ansible-collections-openstack-functional-devstack-magnum
|
||||||
- ansible-collections-openstack-functional-devstack-manila
|
- ansible-collections-openstack-functional-devstack-manila
|
||||||
@@ -345,6 +400,8 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- tox-pep8
|
- tox-pep8
|
||||||
- openstack-tox-linters-ansible-2.18
|
- openstack-tox-linters-ansible-2.18
|
||||||
|
- openstack-tox-linters-ansible-2.19
|
||||||
|
- openstack-tox-linters-ansible-2.20
|
||||||
- ansible-collections-openstack-functional-devstack-releases
|
- ansible-collections-openstack-functional-devstack-releases
|
||||||
- ansible-collections-openstack-functional-devstack-magnum
|
- ansible-collections-openstack-functional-devstack-magnum
|
||||||
- ansible-collections-openstack-functional-devstack-manila
|
- ansible-collections-openstack-functional-devstack-manila
|
||||||
@@ -354,9 +411,13 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters-ansible-devel
|
- openstack-tox-linters-ansible-devel
|
||||||
- openstack-tox-linters-ansible-2.18
|
- openstack-tox-linters-ansible-2.18
|
||||||
|
- openstack-tox-linters-ansible-2.19
|
||||||
|
- openstack-tox-linters-ansible-2.20
|
||||||
- ansible-collections-openstack-functional-devstack
|
- ansible-collections-openstack-functional-devstack
|
||||||
- ansible-collections-openstack-functional-devstack-releases
|
- ansible-collections-openstack-functional-devstack-releases
|
||||||
- ansible-collections-openstack-functional-devstack-ansible-2.18
|
- ansible-collections-openstack-functional-devstack-ansible-2.18
|
||||||
|
- ansible-collections-openstack-functional-devstack-ansible-2.19
|
||||||
|
- ansible-collections-openstack-functional-devstack-ansible-2.20
|
||||||
- ansible-collections-openstack-functional-devstack-ansible-devel
|
- ansible-collections-openstack-functional-devstack-ansible-devel
|
||||||
- bifrost-collections-src
|
- bifrost-collections-src
|
||||||
- bifrost-keystone-collections-src
|
- bifrost-keystone-collections-src
|
||||||
|
|||||||
@@ -32,16 +32,15 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
import copy
|
import copy
|
||||||
from ansible.module_utils.six import raise_from
|
|
||||||
try:
|
try:
|
||||||
from ansible.module_utils.compat.version import StrictVersion
|
from ansible.module_utils.compat.version import StrictVersion
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from distutils.version import StrictVersion
|
from distutils.version import StrictVersion
|
||||||
except ImportError as exc:
|
except ImportError as exc:
|
||||||
raise_from(ImportError('To use this plugin or module with ansible-core'
|
raise ImportError(f'To use this plugin or module with ansible-core'
|
||||||
' < 2.11, you need to use Python < 3.12 with '
|
f' < 2.11, you need to use Python < 3.12 with '
|
||||||
'distutils.version present'), exc)
|
f'distutils.version present. {exc}')
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
12
tests/requirements-ansible-2.19.txt
Normal file
12
tests/requirements-ansible-2.19.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
ansible-core>=2.19.0,<2.20.0
|
||||||
|
flake8
|
||||||
|
galaxy-importer
|
||||||
|
openstacksdk
|
||||||
|
pycodestyle
|
||||||
|
pylint
|
||||||
|
rstcheck
|
||||||
|
ruamel.yaml
|
||||||
|
tox
|
||||||
|
voluptuous
|
||||||
|
yamllint
|
||||||
|
setuptools
|
||||||
12
tests/requirements-ansible-2.20.txt
Normal file
12
tests/requirements-ansible-2.20.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
ansible-core>=2.20.0,<2.21.0
|
||||||
|
flake8
|
||||||
|
galaxy-importer
|
||||||
|
openstacksdk
|
||||||
|
pycodestyle
|
||||||
|
pylint
|
||||||
|
rstcheck
|
||||||
|
ruamel.yaml
|
||||||
|
tox
|
||||||
|
voluptuous
|
||||||
|
yamllint
|
||||||
|
setuptools
|
||||||
16
tox.ini
16
tox.ini
@@ -41,7 +41,7 @@ commands =
|
|||||||
ansible-galaxy collection build --force {toxinidir} --output-path {toxinidir}/build_artifact
|
ansible-galaxy collection build --force {toxinidir} --output-path {toxinidir}/build_artifact
|
||||||
bash {toxinidir}/tools/check-import.sh {toxinidir}
|
bash {toxinidir}/tools/check-import.sh {toxinidir}
|
||||||
|
|
||||||
[testenv:linters_{2_9,2_11,2_12,2_16,2_18,latest}]
|
[testenv:linters_{2_18,2_19,2_20,latest}]
|
||||||
allowlist_externals = bash
|
allowlist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
{[testenv:build]commands}
|
{[testenv:build]commands}
|
||||||
@@ -52,11 +52,9 @@ deps =
|
|||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
{[testenv:build]deps}
|
{[testenv:build]deps}
|
||||||
linters_latest: -r{toxinidir}/tests/requirements.txt
|
linters_latest: -r{toxinidir}/tests/requirements.txt
|
||||||
linters_2_9: -r{toxinidir}/tests/requirements-ansible-2.9.txt
|
|
||||||
linters_2_11: -r{toxinidir}/tests/requirements-ansible-2.11.txt
|
|
||||||
linters_2_12: -r{toxinidir}/tests/requirements-ansible-2.12.txt
|
|
||||||
linters_2_16: -r{toxinidir}/tests/requirements-ansible-2.16.txt
|
|
||||||
linters_2_18: -r{toxinidir}/tests/requirements-ansible-2.18.txt
|
linters_2_18: -r{toxinidir}/tests/requirements-ansible-2.18.txt
|
||||||
|
linters_2_19: -r{toxinidir}/tests/requirements-ansible-2.19.txt
|
||||||
|
linters_2_20: -r{toxinidir}/tests/requirements-ansible-2.20.txt
|
||||||
passenv = *
|
passenv = *
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
@@ -70,18 +68,16 @@ ignore = W503,H4,E501,E402,H301
|
|||||||
show-source = True
|
show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
||||||
|
|
||||||
[testenv:ansible_{2_9,2_11,2_12,2_16,2_18,latest}]
|
[testenv:ansible_{2_18,2_19,2_20,latest}]
|
||||||
allowlist_externals = bash
|
allowlist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
ansible_latest: -r{toxinidir}/tests/requirements.txt
|
ansible_latest: -r{toxinidir}/tests/requirements.txt
|
||||||
ansible_2_9: -r{toxinidir}/tests/requirements-ansible-2.9.txt
|
|
||||||
ansible_2_11: -r{toxinidir}/tests/requirements-ansible-2.11.txt
|
|
||||||
ansible_2_12: -r{toxinidir}/tests/requirements-ansible-2.12.txt
|
|
||||||
ansible_2_16: -r{toxinidir}/tests/requirements-ansible-2.16.txt
|
|
||||||
ansible_2_18: -r{toxinidir}/tests/requirements-ansible-2.18.txt
|
ansible_2_18: -r{toxinidir}/tests/requirements-ansible-2.18.txt
|
||||||
|
ansible_2_19: -r{toxinidir}/tests/requirements-ansible-2.19.txt
|
||||||
|
ansible_2_20: -r{toxinidir}/tests/requirements-ansible-2.20.txt
|
||||||
# Need to pass some env vars for the Ansible playbooks
|
# Need to pass some env vars for the Ansible playbooks
|
||||||
passenv =
|
passenv =
|
||||||
HOME
|
HOME
|
||||||
|
|||||||
Reference in New Issue
Block a user