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
|
||||
override-checkout: master
|
||||
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:
|
||||
name: ansible-collections-openstack-functional-devstack-releases
|
||||
@ -126,7 +126,11 @@
|
||||
description: |
|
||||
Run openstack collections functional tests against a master devstack
|
||||
using latest releases of openstacksdk and latest ansible release
|
||||
# OpenStack SDK 1.*.* has not been released to PyPI yet
|
||||
voting: false
|
||||
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
|
||||
|
||||
- job:
|
||||
@ -146,7 +150,7 @@
|
||||
name: openstack/openstacksdk
|
||||
override-checkout: master
|
||||
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
|
||||
|
||||
# Job with Ansible 2.9 for checking backward compatibility
|
||||
@ -446,9 +450,23 @@
|
||||
|
||||
# Linters
|
||||
- job:
|
||||
name: openstack-tox-linters-ansible-devel
|
||||
name: openstack-tox-linters-ansible
|
||||
parent: openstack-tox-linters
|
||||
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: |
|
||||
Run openstack collections linter tests using the devel branch of ansible
|
||||
# non-voting because we can't prevent ansible devel from breaking us
|
||||
@ -457,31 +475,25 @@
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: devel
|
||||
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
|
||||
bindep_profile: test py38
|
||||
|
||||
- job:
|
||||
name: openstack-tox-linters-ansible-2.12
|
||||
parent: openstack-tox-linters
|
||||
nodeset: ubuntu-focal
|
||||
parent: openstack-tox-linters-ansible
|
||||
description: |
|
||||
Run openstack collections linter tests using the 2.12 branch of ansible
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: stable-2.12
|
||||
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
|
||||
bindep_profile: test py38
|
||||
|
||||
- job:
|
||||
name: openstack-tox-linters-ansible-2.9
|
||||
parent: openstack-tox-linters
|
||||
parent: openstack-tox-linters-ansible
|
||||
nodeset: ubuntu-bionic
|
||||
description: |
|
||||
Run openstack collections linter tests using the 2.9 branch of ansible
|
||||
@ -489,8 +501,6 @@
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: stable-2.9
|
||||
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
|
||||
|
||||
# Cross-checks with other projects
|
||||
@ -535,7 +545,6 @@
|
||||
- ^tests/.*$
|
||||
- ^tools/.*$
|
||||
- ^requirements.*$
|
||||
- ^test-requirements.*$
|
||||
- ^setup.*$
|
||||
- tox.ini
|
||||
# Run only on files used in TripleO
|
||||
|
@ -1 +0,0 @@
|
||||
test-requirements-2.12.txt
|
1
tests/constraints-openstacksdk-1.x.x.txt
Normal file
1
tests/constraints-openstacksdk-1.x.x.txt
Normal file
@ -0,0 +1 @@
|
||||
openstacksdk>=1.0.0
|
@ -1,11 +1,11 @@
|
||||
openstacksdk
|
||||
ansible-core>=2.11.0,<2.12.0
|
||||
pycodestyle
|
||||
flake8
|
||||
galaxy-importer
|
||||
openstacksdk
|
||||
pycodestyle
|
||||
pylint
|
||||
voluptuous
|
||||
yamllint
|
||||
rstcheck
|
||||
ruamel.yaml
|
||||
galaxy-importer
|
||||
tox
|
||||
voluptuous
|
||||
yamllint
|
11
tests/requirements-ansible-2.12.txt
Normal file
11
tests/requirements-ansible-2.12.txt
Normal file
@ -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.10
|
||||
pycodestyle
|
||||
ansible>=2.9.0,<2.10.0
|
||||
flake8
|
||||
pylint
|
||||
voluptuous
|
||||
yamllint
|
||||
rstcheck
|
||||
ruamel.yaml
|
||||
# galaxy-importer 0.3.2 moved from ansible 2.9 to ansible-core 2.11
|
||||
# Ref.: https://github.com/ansible/galaxy-importer/commit/98933547831922c45243f39d85eefe150b55fc36
|
||||
galaxy-importer==0.3.1
|
||||
openstacksdk
|
||||
pycodestyle
|
||||
pylint
|
||||
rstcheck
|
||||
ruamel.yaml
|
||||
tox
|
||||
voluptuous
|
||||
yamllint
|
@ -1,11 +1,11 @@
|
||||
openstacksdk
|
||||
ansible-core
|
||||
pycodestyle
|
||||
flake8
|
||||
galaxy-importer
|
||||
openstacksdk
|
||||
pycodestyle
|
||||
pylint
|
||||
voluptuous
|
||||
yamllint
|
||||
rstcheck
|
||||
ruamel.yaml
|
||||
galaxy-importer
|
||||
tox
|
||||
voluptuous
|
||||
yamllint
|
49
tox.ini
49
tox.ini
@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 3.18.0
|
||||
envlist = pep8
|
||||
envlist = linters
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
@ -21,8 +21,8 @@ setenv =
|
||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||
pip: PIP_INSTALL={env:PIP_INSTALL:true}
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements.txt
|
||||
pip: {toxinidir}
|
||||
|
||||
commands = stestr run {posargs}
|
||||
@ -34,10 +34,10 @@ commands =
|
||||
|
||||
[testenv:build]
|
||||
deps =
|
||||
ansible-core
|
||||
galaxy-importer
|
||||
pbr
|
||||
ruamel.yaml
|
||||
galaxy-importer
|
||||
ansible-core
|
||||
|
||||
commands =
|
||||
python {toxinidir}/tools/build.py
|
||||
@ -59,28 +59,22 @@ commands =
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.9.txt
|
||||
|
||||
[testenv:linters-2.11]
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.11.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.11.txt
|
||||
|
||||
[testenv:linters-2.12]
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.12.txt
|
||||
|
||||
[testenv:venv]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = {posargs}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.12.txt
|
||||
|
||||
[flake8]
|
||||
# W503 Is supposed to be off by default but in the latest pycodestyle isn't.
|
||||
@ -104,33 +98,24 @@ deps =
|
||||
commands =
|
||||
/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]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.9.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:ansible-2.11]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.11.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.11.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:ansible-2.12]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.12.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.12.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user