New CI jobs configuration
Change-Id: Ib6850184faf1bc0808502c098d610a5e2f41f47e
This commit is contained in:
parent
5e3a91a7c6
commit
01c2499fb6
160
.zuul.yaml
160
.zuul.yaml
@ -10,7 +10,7 @@
|
||||
- openstack/ansible-collections-openstack
|
||||
vars:
|
||||
zuul_work_dir: src/opendev.org/openstack/ansible-collections-openstack
|
||||
tox_envlist: ansible
|
||||
tox_envlist: ansible-2.9
|
||||
tox_install_siblings: true
|
||||
fetch_subunit: false
|
||||
|
||||
@ -21,56 +21,74 @@
|
||||
Run openstack collections functional tests against a master devstack
|
||||
using releases of openstacksdk and latest ansible release
|
||||
vars:
|
||||
tox_envlist: ansible-2.9
|
||||
tox_install_siblings: false
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-ansible-2.10
|
||||
parent: ansible-collections-openstack-functional-devstack
|
||||
description: |
|
||||
Run openstack collections functional tests against a master devstack
|
||||
using master of openstacksdk and stable 2.10 branch of ansible
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: stable-2.10
|
||||
vars:
|
||||
tox_envlist: ansible
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-ansible-2.9
|
||||
parent: ansible-collections-openstack-functional-devstack
|
||||
description: |
|
||||
Run openstack collections functional tests against a master devstack
|
||||
using master of openstacksdk and stable 2.10 branch of ansible
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: stable-2.9
|
||||
vars:
|
||||
tox_envlist: ansible-2.9
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-ansible-devel
|
||||
parent: ansible-collections-openstack-functional-devstack
|
||||
description: |
|
||||
Run openstack collections functional tests against a master devstack
|
||||
using master of openstacksdk and devel branch of ansible
|
||||
# non-voting because we can't prevent ansible devel from breaking us
|
||||
voting: false
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: devel
|
||||
vars:
|
||||
tox_envlist: ansible
|
||||
|
||||
# Pip installation job
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-ansible-2.9
|
||||
parent: ansible-collections-openstack-functional-devstack-ansible-devel
|
||||
name: ansible-collections-openstack-functional-devstack-ansible-pip
|
||||
parent: ansible-collections-openstack-functional-devstack
|
||||
description: |
|
||||
Run openstack collections functional tests against a master devstack
|
||||
using master of openstacksdk and stable 2.9 branch of ansible
|
||||
using master of openstacksdk with latest ansible release.
|
||||
Ansible collection is built using PIP.
|
||||
vars:
|
||||
tox_envlist: ansible-pip
|
||||
|
||||
# Stable branches
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-ussuri-ansible-2.9
|
||||
parent: ansible-collections-openstack-functional-devstack-ansible-devel
|
||||
description: |
|
||||
Run openstack collections functional tests against a ussuri devstack
|
||||
using ussuri brach of openstacksdk and stable 2.9 branch of ansible
|
||||
voting: true
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: stable-2.9
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-ansible-2.9-pip
|
||||
parent: ansible-collections-openstack-functional-devstack-ansible-2.9
|
||||
description: |
|
||||
Run openstack collections functional tests against a master devstack
|
||||
using master of openstacksdk and stable 2.9 branch of ansible.
|
||||
Ansible collection is built using PIP
|
||||
vars:
|
||||
tox_envlist: ansible-pip
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-train-ansible-devel
|
||||
parent: ansible-collections-openstack-functional-devstack
|
||||
description: |
|
||||
Run openstack collections functional tests against a train devstack
|
||||
using train brach of openstacksdk and devel branch of ansible
|
||||
# non-voting because we can't prevent ansible devel from breaking us
|
||||
voting: false
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: devel
|
||||
- name: openstack/openstacksdk
|
||||
override-branch: train
|
||||
override-branch: ussuri
|
||||
- name: openstack/devstack
|
||||
override-checkout: train
|
||||
override-checkout: ussuri
|
||||
vars:
|
||||
tox_envlist: ansible-2.9
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-train-ansible-2.9
|
||||
@ -86,22 +104,8 @@
|
||||
override-branch: train
|
||||
- name: openstack/devstack
|
||||
override-checkout: train
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-stein-ansible-devel
|
||||
parent: ansible-collections-openstack-functional-devstack
|
||||
description: |
|
||||
Run openstack collections functional tests against a stein devstack
|
||||
using stein brach of openstacksdk and devel branch of ansible
|
||||
# non-voting because we can't prevent ansible devel from breaking us
|
||||
voting: false
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: devel
|
||||
- name: openstack/openstacksdk
|
||||
override-branch: stein
|
||||
- name: openstack/devstack
|
||||
override-checkout: stein
|
||||
vars:
|
||||
tox_envlist: ansible-2.9
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-stein-ansible-2.9
|
||||
@ -117,22 +121,8 @@
|
||||
override-branch: stein
|
||||
- name: openstack/devstack
|
||||
override-checkout: stein
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-rocky-ansible-devel
|
||||
parent: ansible-collections-openstack-functional-devstack
|
||||
description: |
|
||||
Run openstack collections functional tests against a rocky devstack
|
||||
using rocky brach of openstacksdk and devel branch of ansible
|
||||
# non-voting because we can't prevent ansible devel from breaking us
|
||||
voting: false
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: devel
|
||||
- name: openstack/openstacksdk
|
||||
override-branch: rocky
|
||||
- name: openstack/devstack
|
||||
override-checkout: rocky
|
||||
vars:
|
||||
tox_envlist: ansible-2.9
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-rocky-ansible-2.9
|
||||
@ -148,6 +138,8 @@
|
||||
override-branch: rocky
|
||||
- name: openstack/devstack
|
||||
override-checkout: rocky
|
||||
vars:
|
||||
tox_envlist: ansible-2.9
|
||||
|
||||
- job:
|
||||
name: ansible-collections-openstack-functional-devstack-queens-ansible-2.9
|
||||
@ -163,7 +155,10 @@
|
||||
override-branch: master
|
||||
- name: openstack/devstack
|
||||
override-checkout: queens
|
||||
vars:
|
||||
tox_envlist: ansible-2.9
|
||||
|
||||
# Linters
|
||||
- job:
|
||||
name: openstack-tox-linters-ansible-devel
|
||||
parent: openstack-tox-linters
|
||||
@ -175,6 +170,16 @@
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: devel
|
||||
|
||||
- job:
|
||||
name: openstack-tox-linters-ansible-2.10
|
||||
parent: openstack-tox-linters
|
||||
description: |
|
||||
Run openstack collections linter tests using the 2.9 branch of ansible
|
||||
voting: true
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: stable-2.10
|
||||
|
||||
- job:
|
||||
name: openstack-tox-linters-ansible-2.9
|
||||
parent: openstack-tox-linters
|
||||
@ -184,12 +189,15 @@
|
||||
required-projects:
|
||||
- name: github.com/ansible/ansible
|
||||
override-checkout: stable-2.9
|
||||
vars:
|
||||
tox_envlist: linters-2.9
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- tox-pep8
|
||||
- openstack-tox-linters-ansible-devel
|
||||
- openstack-tox-linters-ansible-2.10
|
||||
- openstack-tox-linters-ansible-2.9
|
||||
- ansible-collections-openstack-functional-devstack:
|
||||
dependencies: &deps_unit_lint
|
||||
@ -205,50 +213,52 @@
|
||||
- tests/sanity/.*
|
||||
- contrib/.*
|
||||
|
||||
- ansible-collections-openstack-functional-devstack-releases:
|
||||
- ansible-collections-openstack-functional-devstack:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-ansible-devel:
|
||||
- ansible-collections-openstack-functional-devstack-releases:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-ansible-2.9:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-train-ansible-devel:
|
||||
- ansible-collections-openstack-functional-devstack-ansible-2.10:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-ansible-devel:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-ansible-pip:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-ussuri-ansible-2.9:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-train-ansible-2.9:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-stein-ansible-devel:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-stein-ansible-2.9:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-rocky-ansible-devel:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-rocky-ansible-2.9:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-queens-ansible-2.9:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
- ansible-collections-openstack-functional-devstack-ansible-2.9-pip:
|
||||
dependencies: *deps_unit_lint
|
||||
irrelevant-files: *ignore_files
|
||||
|
||||
|
||||
gate:
|
||||
jobs:
|
||||
- tox-pep8
|
||||
- openstack-tox-linters-ansible-2.10
|
||||
- openstack-tox-linters-ansible-2.9
|
||||
- ansible-collections-openstack-functional-devstack
|
||||
- ansible-collections-openstack-functional-devstack-releases
|
||||
- ansible-collections-openstack-functional-devstack-ansible-2.9
|
||||
- ansible-collections-openstack-functional-devstack-ansible-2.10
|
||||
- ansible-collections-openstack-functional-devstack-ansible-pip
|
||||
- ansible-collections-openstack-functional-devstack-ussuri-ansible-2.9
|
||||
- ansible-collections-openstack-functional-devstack-train-ansible-2.9
|
||||
- ansible-collections-openstack-functional-devstack-stein-ansible-2.9
|
||||
- ansible-collections-openstack-functional-devstack-rocky-ansible-2.9
|
||||
- ansible-collections-openstack-functional-devstack-queens-ansible-2.9
|
||||
|
||||
|
@ -54,6 +54,16 @@ fi
|
||||
shift $((OPTIND-1))
|
||||
TAGS=$( echo "$*" | tr ' ' , )
|
||||
|
||||
# Install collections before dealing with Ansible virtual environments
|
||||
if [[ -z "$PIP_INSTALL" ]]; then
|
||||
tox -ebuild
|
||||
ansible-galaxy collection install $(ls build_artifact/openstack-cloud-*) --force
|
||||
TEST_COLLECTIONS_PATHS=${HOME}/.ansible/collections:$ANSIBLE_COLLECTIONS_PATHS
|
||||
else
|
||||
pip freeze | grep ansible-collections-openstack
|
||||
TEST_COLLECTIONS_PATHS=$VIRTUAL_ENV/share/ansible/collections:$ANSIBLE_COLLECTIONS_PATHS
|
||||
fi
|
||||
|
||||
# We need to source the current tox environment so that Ansible will
|
||||
# be setup for the correct python environment.
|
||||
source $ENVDIR/bin/activate
|
||||
@ -96,15 +106,6 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# install collections
|
||||
if [[ -z "$PIP_INSTALL" ]]; then
|
||||
tox -ebuild
|
||||
ansible-galaxy collection install $(ls build_artifact/openstack-cloud-*) --force
|
||||
TEST_COLLECTIONS_PATHS=${HOME}/.ansible/collections:$ANSIBLE_COLLECTIONS_PATHS
|
||||
else
|
||||
pip freeze | grep ansible-collections-openstack
|
||||
TEST_COLLECTIONS_PATHS=$VIRTUAL_ENV/share/ansible/collections:$ANSIBLE_COLLECTIONS_PATHS
|
||||
fi
|
||||
# Discover openstackSDK version
|
||||
SDK_VER=$(python -c "import openstack; print(openstack.version.__version__)")
|
||||
pushd ci/
|
||||
|
11
test-requirements-2.9.txt
Normal file
11
test-requirements-2.9.txt
Normal file
@ -0,0 +1,11 @@
|
||||
openstacksdk
|
||||
ansible
|
||||
pycodestyle
|
||||
flake8
|
||||
pylint
|
||||
voluptuous
|
||||
yamllint
|
||||
rstcheck
|
||||
ruamel.yaml
|
||||
galaxy-importer
|
||||
tox
|
@ -1,6 +1,5 @@
|
||||
ansible
|
||||
ansible-base
|
||||
openstacksdk
|
||||
ansible-base
|
||||
pycodestyle
|
||||
flake8
|
||||
pylint
|
||||
|
9
tests/sanity/ignore-2.11.txt
Normal file
9
tests/sanity/ignore-2.11.txt
Normal file
@ -0,0 +1,9 @@
|
||||
plugins/modules/compute_flavor_info.py pylint:ansible-deprecated-no-collection-name
|
||||
plugins/modules/identity_domain_info.py pylint:ansible-deprecated-no-collection-name
|
||||
plugins/modules/identity_user_info.py pylint:ansible-deprecated-no-collection-name
|
||||
plugins/modules/image_info.py pylint:ansible-deprecated-no-collection-name
|
||||
plugins/modules/networks_info.py pylint:ansible-deprecated-no-collection-name
|
||||
plugins/modules/port_info.py pylint:ansible-deprecated-no-collection-name
|
||||
plugins/modules/project_info.py pylint:ansible-deprecated-no-collection-name
|
||||
plugins/modules/subnets_info.py pylint:ansible-deprecated-no-collection-name
|
||||
plugins/module_utils/openstack.py pylint:ansible-deprecated-no-collection-name
|
@ -23,6 +23,8 @@ rm -rf "${ANSIBLE_COLLECTIONS_PATH}"
|
||||
mkdir -p ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud
|
||||
cp -a ${TOXDIR}/{plugins,meta,scripts,tests,docs} ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud
|
||||
cd ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud/
|
||||
echo "Running ansible-test with version:"
|
||||
ansible --version
|
||||
ansible-test sanity -v \
|
||||
--venv \
|
||||
--python 3.6 \
|
||||
|
22
tox.ini
22
tox.ini
@ -39,20 +39,30 @@ deps =
|
||||
pbr
|
||||
ruamel.yaml
|
||||
galaxy-importer
|
||||
git+https://github.com/ansible/ansible
|
||||
ansible-base
|
||||
|
||||
commands =
|
||||
python {toxinidir}/tools/build.py
|
||||
ansible --version
|
||||
ansible-galaxy collection build --force {toxinidir} --output-path {toxinidir}/build_artifact
|
||||
/bin/bash {toxinidir}/tools/check-import.sh {toxinidir}
|
||||
|
||||
[testenv:linters]
|
||||
passenv = *
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
commands =
|
||||
{[testenv:build]commands}
|
||||
{[testenv:pep8]commands}
|
||||
ansible --version
|
||||
/bin/bash {toxinidir}/tools/run-ansible-sanity.sh {toxinidir}
|
||||
|
||||
[testenv:linters-2.9]
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
|
||||
[testenv:venv]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
@ -80,6 +90,16 @@ 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 =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
{toxinidir}
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:ansible-2.9]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
Loading…
Reference in New Issue
Block a user