Refactored tox requirements for different Ansible releases
Sorted pip requirements file to improve readability. Moved pip requirements for tests into tests subdirectory and dropped 'pip-' prefix to shorten filenames and conform with common naming scheme for pip requirements files. Added constrains on OpenStack SDK 1.*.* to job ansible-collections-\ openstack-functional-devstack-releases on master branch because only stable/1.0.0 branch is compatible to the OpenStack SDK 0.*.* series. Changed job ansible-collections-openstack-functional-devstack-releases on master branch to non-voting because OpenStack SDK 1.*.* has not been released to PyPI yet, so tests on master branch are expected to fail once we introduce breaking changes from stable/1.0.0 branch. Change-Id: I6b6bb8c6900f7c8341bbf3f9a24999fbf693ba4b
This commit is contained in:
parent
b376e3e146
commit
a03dd05465
37
.zuul.yaml
37
.zuul.yaml
|
@ -117,7 +117,7 @@
|
||||||
name: openstack/openstacksdk
|
name: openstack/openstacksdk
|
||||||
override-checkout: master
|
override-checkout: master
|
||||||
vars:
|
vars:
|
||||||
tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/pip-constraints-openstacksdk-0.x.x.txt'
|
tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/constraints-openstacksdk-0.x.x.txt'
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: ansible-collections-openstack-functional-devstack-releases
|
name: ansible-collections-openstack-functional-devstack-releases
|
||||||
|
@ -126,7 +126,11 @@
|
||||||
description: |
|
description: |
|
||||||
Run openstack collections functional tests against a master devstack
|
Run openstack collections functional tests against a master devstack
|
||||||
using latest releases of openstacksdk and latest ansible release
|
using latest releases of openstacksdk and latest ansible release
|
||||||
|
# OpenStack SDK 1.*.* has not been released to PyPI yet
|
||||||
|
voting: false
|
||||||
vars:
|
vars:
|
||||||
|
# Uncomment once OpenStack SDK 1.*.* has been released to PyPI
|
||||||
|
# tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/constraints-openstacksdk-1.x.x.txt'
|
||||||
tox_install_siblings: false
|
tox_install_siblings: false
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
|
@ -146,7 +150,7 @@
|
||||||
name: openstack/openstacksdk
|
name: openstack/openstacksdk
|
||||||
override-checkout: master
|
override-checkout: master
|
||||||
vars:
|
vars:
|
||||||
tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/pip-constraints-openstacksdk-0.x.x.txt'
|
tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/constraints-openstacksdk-0.x.x.txt'
|
||||||
tox_install_siblings: false
|
tox_install_siblings: false
|
||||||
|
|
||||||
# Job with Ansible 2.9 for checking backward compatibility
|
# Job with Ansible 2.9 for checking backward compatibility
|
||||||
|
@ -446,9 +450,23 @@
|
||||||
|
|
||||||
# Linters
|
# Linters
|
||||||
- job:
|
- job:
|
||||||
name: openstack-tox-linters-ansible-devel
|
name: openstack-tox-linters-ansible
|
||||||
parent: openstack-tox-linters
|
parent: openstack-tox-linters
|
||||||
nodeset: ubuntu-focal
|
nodeset: ubuntu-focal
|
||||||
|
description: |
|
||||||
|
Run openstack collections linter tests using the master branch of ansible
|
||||||
|
required-projects:
|
||||||
|
- name: github.com/ansible/ansible
|
||||||
|
override-checkout: master
|
||||||
|
vars:
|
||||||
|
# override tox_constraints_file from parent job
|
||||||
|
tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/constraints-none.txt'
|
||||||
|
tox_envlist: linters
|
||||||
|
tox_install_siblings: true
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-tox-linters-ansible-devel
|
||||||
|
parent: openstack-tox-linters-ansible
|
||||||
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
|
||||||
|
@ -457,31 +475,25 @@
|
||||||
- name: github.com/ansible/ansible
|
- name: github.com/ansible/ansible
|
||||||
override-checkout: devel
|
override-checkout: devel
|
||||||
vars:
|
vars:
|
||||||
# override tox_constraints_file from parent job
|
|
||||||
tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/pip-constraints-none.txt'
|
|
||||||
tox_envlist: linters-2.12
|
|
||||||
python_version: 3.8
|
python_version: 3.8
|
||||||
bindep_profile: test py38
|
bindep_profile: test py38
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-tox-linters-ansible-2.12
|
name: openstack-tox-linters-ansible-2.12
|
||||||
parent: openstack-tox-linters
|
parent: openstack-tox-linters-ansible
|
||||||
nodeset: ubuntu-focal
|
|
||||||
description: |
|
description: |
|
||||||
Run openstack collections linter tests using the 2.12 branch of ansible
|
Run openstack collections linter tests using the 2.12 branch of ansible
|
||||||
required-projects:
|
required-projects:
|
||||||
- name: github.com/ansible/ansible
|
- name: github.com/ansible/ansible
|
||||||
override-checkout: stable-2.12
|
override-checkout: stable-2.12
|
||||||
vars:
|
vars:
|
||||||
# override tox_constraints_file from parent job
|
|
||||||
tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/pip-constraints-none.txt'
|
|
||||||
tox_envlist: linters-2.12
|
tox_envlist: linters-2.12
|
||||||
python_version: 3.8
|
python_version: 3.8
|
||||||
bindep_profile: test py38
|
bindep_profile: test py38
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-tox-linters-ansible-2.9
|
name: openstack-tox-linters-ansible-2.9
|
||||||
parent: openstack-tox-linters
|
parent: openstack-tox-linters-ansible
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
description: |
|
description: |
|
||||||
Run openstack collections linter tests using the 2.9 branch of ansible
|
Run openstack collections linter tests using the 2.9 branch of ansible
|
||||||
|
@ -489,8 +501,6 @@
|
||||||
- name: github.com/ansible/ansible
|
- name: github.com/ansible/ansible
|
||||||
override-checkout: stable-2.9
|
override-checkout: stable-2.9
|
||||||
vars:
|
vars:
|
||||||
# override tox_constraints_file from parent job
|
|
||||||
tox_constraints_file: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/pip-constraints-none.txt'
|
|
||||||
tox_envlist: linters-2.9
|
tox_envlist: linters-2.9
|
||||||
|
|
||||||
# Cross-checks with other projects
|
# Cross-checks with other projects
|
||||||
|
@ -535,7 +545,6 @@
|
||||||
- ^tests/.*$
|
- ^tests/.*$
|
||||||
- ^tools/.*$
|
- ^tools/.*$
|
||||||
- ^requirements.*$
|
- ^requirements.*$
|
||||||
- ^test-requirements.*$
|
|
||||||
- ^setup.*$
|
- ^setup.*$
|
||||||
- tox.ini
|
- tox.ini
|
||||||
# Run only on files used in TripleO
|
# Run only on files used in TripleO
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
test-requirements-2.12.txt
|
|
|
@ -0,0 +1 @@
|
||||||
|
openstacksdk>=1.0.0
|
|
@ -1,11 +1,11 @@
|
||||||
openstacksdk
|
|
||||||
ansible-core>=2.11.0,<2.12.0
|
ansible-core>=2.11.0,<2.12.0
|
||||||
pycodestyle
|
|
||||||
flake8
|
flake8
|
||||||
|
galaxy-importer
|
||||||
|
openstacksdk
|
||||||
|
pycodestyle
|
||||||
pylint
|
pylint
|
||||||
voluptuous
|
|
||||||
yamllint
|
|
||||||
rstcheck
|
rstcheck
|
||||||
ruamel.yaml
|
ruamel.yaml
|
||||||
galaxy-importer
|
|
||||||
tox
|
tox
|
||||||
|
voluptuous
|
||||||
|
yamllint
|
|
@ -0,0 +1,11 @@
|
||||||
|
ansible-core>=2.12.0,<2.13.0
|
||||||
|
flake8
|
||||||
|
galaxy-importer
|
||||||
|
openstacksdk
|
||||||
|
pycodestyle
|
||||||
|
pylint
|
||||||
|
rstcheck
|
||||||
|
ruamel.yaml
|
||||||
|
tox
|
||||||
|
voluptuous
|
||||||
|
yamllint
|
|
@ -1,13 +1,13 @@
|
||||||
openstacksdk
|
ansible>=2.9.0,<2.10.0
|
||||||
ansible<2.10
|
|
||||||
pycodestyle
|
|
||||||
flake8
|
flake8
|
||||||
pylint
|
|
||||||
voluptuous
|
|
||||||
yamllint
|
|
||||||
rstcheck
|
|
||||||
ruamel.yaml
|
|
||||||
# galaxy-importer 0.3.2 moved from ansible 2.9 to ansible-core 2.11
|
# galaxy-importer 0.3.2 moved from ansible 2.9 to ansible-core 2.11
|
||||||
# Ref.: https://github.com/ansible/galaxy-importer/commit/98933547831922c45243f39d85eefe150b55fc36
|
# Ref.: https://github.com/ansible/galaxy-importer/commit/98933547831922c45243f39d85eefe150b55fc36
|
||||||
galaxy-importer==0.3.1
|
galaxy-importer==0.3.1
|
||||||
|
openstacksdk
|
||||||
|
pycodestyle
|
||||||
|
pylint
|
||||||
|
rstcheck
|
||||||
|
ruamel.yaml
|
||||||
tox
|
tox
|
||||||
|
voluptuous
|
||||||
|
yamllint
|
|
@ -1,11 +1,11 @@
|
||||||
openstacksdk
|
|
||||||
ansible-core
|
ansible-core
|
||||||
pycodestyle
|
|
||||||
flake8
|
flake8
|
||||||
|
galaxy-importer
|
||||||
|
openstacksdk
|
||||||
|
pycodestyle
|
||||||
pylint
|
pylint
|
||||||
voluptuous
|
|
||||||
yamllint
|
|
||||||
rstcheck
|
rstcheck
|
||||||
ruamel.yaml
|
ruamel.yaml
|
||||||
galaxy-importer
|
|
||||||
tox
|
tox
|
||||||
|
voluptuous
|
||||||
|
yamllint
|
49
tox.ini
49
tox.ini
|
@ -1,6 +1,6 @@
|
||||||
[tox]
|
[tox]
|
||||||
minversion = 3.18.0
|
minversion = 3.18.0
|
||||||
envlist = pep8
|
envlist = linters
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
ignore_basepython_conflict = True
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ setenv =
|
||||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||||
pip: PIP_INSTALL={env:PIP_INSTALL:true}
|
pip: PIP_INSTALL={env:PIP_INSTALL:true}
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/tests/requirements.txt
|
||||||
pip: {toxinidir}
|
pip: {toxinidir}
|
||||||
|
|
||||||
commands = stestr run {posargs}
|
commands = stestr run {posargs}
|
||||||
|
@ -34,10 +34,10 @@ commands =
|
||||||
|
|
||||||
[testenv:build]
|
[testenv:build]
|
||||||
deps =
|
deps =
|
||||||
|
ansible-core
|
||||||
|
galaxy-importer
|
||||||
pbr
|
pbr
|
||||||
ruamel.yaml
|
ruamel.yaml
|
||||||
galaxy-importer
|
|
||||||
ansible-core
|
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
python {toxinidir}/tools/build.py
|
python {toxinidir}/tools/build.py
|
||||||
|
@ -59,28 +59,22 @@ commands =
|
||||||
passenv = {[testenv:linters]passenv}
|
passenv = {[testenv:linters]passenv}
|
||||||
commands = {[testenv:linters]commands}
|
commands = {[testenv:linters]commands}
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
-r{toxinidir}/test-requirements-2.9.txt
|
-r{toxinidir}/tests/requirements-ansible-2.9.txt
|
||||||
|
|
||||||
[testenv:linters-2.11]
|
[testenv:linters-2.11]
|
||||||
passenv = {[testenv:linters]passenv}
|
passenv = {[testenv:linters]passenv}
|
||||||
commands = {[testenv:linters]commands}
|
commands = {[testenv:linters]commands}
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
-r{toxinidir}/test-requirements-2.11.txt
|
-r{toxinidir}/tests/requirements-ansible-2.11.txt
|
||||||
|
|
||||||
[testenv:linters-2.12]
|
[testenv:linters-2.12]
|
||||||
passenv = {[testenv:linters]passenv}
|
passenv = {[testenv:linters]passenv}
|
||||||
commands = {[testenv:linters]commands}
|
commands = {[testenv:linters]commands}
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
-r{toxinidir}/test-requirements-2.12.txt
|
-r{toxinidir}/tests/requirements-ansible-2.12.txt
|
||||||
|
|
||||||
[testenv:venv]
|
|
||||||
deps =
|
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
commands = {posargs}
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# W503 Is supposed to be off by default but in the latest pycodestyle isn't.
|
# W503 Is supposed to be off by default but in the latest pycodestyle isn't.
|
||||||
|
@ -104,33 +98,24 @@ deps =
|
||||||
commands =
|
commands =
|
||||||
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
||||||
|
|
||||||
# PIP job runs with Ansible-2.9
|
|
||||||
[testenv:ansible-pip]
|
|
||||||
deps =
|
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
|
||||||
-r{toxinidir}/test-requirements-2.9.txt
|
|
||||||
{toxinidir}
|
|
||||||
passenv = {[testenv:ansible]passenv}
|
|
||||||
commands = {[testenv:ansible]commands}
|
|
||||||
|
|
||||||
[testenv:ansible-2.9]
|
[testenv:ansible-2.9]
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
-r{toxinidir}/test-requirements-2.9.txt
|
-r{toxinidir}/tests/requirements-ansible-2.9.txt
|
||||||
passenv = {[testenv:ansible]passenv}
|
passenv = {[testenv:ansible]passenv}
|
||||||
commands = {[testenv:ansible]commands}
|
commands = {[testenv:ansible]commands}
|
||||||
|
|
||||||
[testenv:ansible-2.11]
|
[testenv:ansible-2.11]
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
-r{toxinidir}/test-requirements-2.11.txt
|
-r{toxinidir}/tests/requirements-ansible-2.11.txt
|
||||||
passenv = {[testenv:ansible]passenv}
|
passenv = {[testenv:ansible]passenv}
|
||||||
commands = {[testenv:ansible]commands}
|
commands = {[testenv:ansible]commands}
|
||||||
|
|
||||||
[testenv:ansible-2.12]
|
[testenv:ansible-2.12]
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||||
-r{toxinidir}/test-requirements-2.12.txt
|
-r{toxinidir}/tests/requirements-ansible-2.12.txt
|
||||||
passenv = {[testenv:ansible]passenv}
|
passenv = {[testenv:ansible]passenv}
|
||||||
commands = {[testenv:ansible]commands}
|
commands = {[testenv:ansible]commands}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue