Improve ansible-test sanity for collection

Check only things we build into collection.
Ignore sanity files from full CI jobs.
Add queens to gate because it's voting.
Add files to ignoring when building collection.
Remove non-required lines from ignorign sanity files.

Change-Id: I0dde756efa133cf75b67d072af78a1f8307ce932
This commit is contained in:
Sagi Shnaidman 2020-05-12 22:50:30 +03:00
parent e47c4671c7
commit bcdf749938
5 changed files with 27 additions and 39 deletions

View File

@ -185,26 +185,44 @@
dependencies: &deps_unit_lint dependencies: &deps_unit_lint
- tox-pep8 - tox-pep8
- openstack-tox-linters-ansible-2.9 - openstack-tox-linters-ansible-2.9
irrelevant-files: &ignore_files
- changelogs/.*
- COPYING
- docs/.*
- README.md
- tools/run-ansible-sanity.sh
- tests/sanity/.*
- ansible-collections-openstack-functional-devstack-releases: - ansible-collections-openstack-functional-devstack-releases:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-ansible-devel: - ansible-collections-openstack-functional-devstack-ansible-devel:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-ansible-2.9: - ansible-collections-openstack-functional-devstack-ansible-2.9:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-train-ansible-devel: - ansible-collections-openstack-functional-devstack-train-ansible-devel:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-train-ansible-2.9: - ansible-collections-openstack-functional-devstack-train-ansible-2.9:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-stein-ansible-devel: - ansible-collections-openstack-functional-devstack-stein-ansible-devel:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-stein-ansible-2.9: - ansible-collections-openstack-functional-devstack-stein-ansible-2.9:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-rocky-ansible-devel: - ansible-collections-openstack-functional-devstack-rocky-ansible-devel:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-rocky-ansible-2.9: - ansible-collections-openstack-functional-devstack-rocky-ansible-2.9:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
- ansible-collections-openstack-functional-devstack-queens-ansible-2.9: - ansible-collections-openstack-functional-devstack-queens-ansible-2.9:
dependencies: *deps_unit_lint dependencies: *deps_unit_lint
irrelevant-files: *ignore_files
gate: gate:
@ -217,4 +235,5 @@
- ansible-collections-openstack-functional-devstack-train-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-stein-ansible-2.9
- ansible-collections-openstack-functional-devstack-rocky-ansible-2.9 - ansible-collections-openstack-functional-devstack-rocky-ansible-2.9
- ansible-collections-openstack-functional-devstack-queens-ansible-2.9

View File

@ -21,5 +21,7 @@ build_ignore:
- setup.cfg - setup.cfg
- test-requirements.txt - test-requirements.txt
- tests/ - tests/
- tools/
- tox.ini - tox.ini
- zuul.yaml - .zuul.yaml
- .pytest_cache

View File

@ -1,18 +0,0 @@
plugins/module_utils/openstack.py future-import-boilerplate
plugins/module_utils/openstack.py metaclass-boilerplate
plugins/doc_fragments/openstack.py future-import-boilerplate
plugins/doc_fragments/openstack.py metaclass-boilerplate
scripts/inventory/openstack_inventory.py future-import-boilerplate
scripts/inventory/openstack_inventory.py metaclass-boilerplate
tests/unit/mock/path.py future-import-boilerplate
tests/unit/mock/path.py metaclass-boilerplate
tests/unit/mock/yaml_helper.py future-import-boilerplate
tests/unit/mock/yaml_helper.py metaclass-boilerplate
tests/unit/modules/cloud/openstack/test_server.py future-import-boilerplate
tests/unit/modules/cloud/openstack/test_server.py metaclass-boilerplate
tests/unit/modules/conftest.py future-import-boilerplate
tests/unit/modules/conftest.py metaclass-boilerplate
tests/unit/modules/utils.py future-import-boilerplate
tests/unit/modules/utils.py metaclass-boilerplate
tools/groups-to-routing.py compile-2.7!skip
tools/groups-to-routing.py compile-3.5!skip

View File

@ -1,18 +0,0 @@
plugins/module_utils/openstack.py future-import-boilerplate
plugins/module_utils/openstack.py metaclass-boilerplate
plugins/doc_fragments/openstack.py future-import-boilerplate
plugins/doc_fragments/openstack.py metaclass-boilerplate
scripts/inventory/openstack_inventory.py future-import-boilerplate
scripts/inventory/openstack_inventory.py metaclass-boilerplate
tests/unit/mock/path.py future-import-boilerplate
tests/unit/mock/path.py metaclass-boilerplate
tests/unit/mock/yaml_helper.py future-import-boilerplate
tests/unit/mock/yaml_helper.py metaclass-boilerplate
tests/unit/modules/cloud/openstack/test_server.py future-import-boilerplate
tests/unit/modules/cloud/openstack/test_server.py metaclass-boilerplate
tests/unit/modules/conftest.py future-import-boilerplate
tests/unit/modules/conftest.py metaclass-boilerplate
tests/unit/modules/utils.py future-import-boilerplate
tests/unit/modules/utils.py metaclass-boilerplate
tools/groups-to-routing.py compile-2.7!skip
tools/groups-to-routing.py compile-3.5!skip

View File

@ -21,6 +21,9 @@ trap "rm -rf ${ANSIBLE_COLLECTIONS_PATH}" err exit
rm -rf "${ANSIBLE_COLLECTIONS_PATH}" rm -rf "${ANSIBLE_COLLECTIONS_PATH}"
mkdir -p ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud mkdir -p ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud
cp -a ${TOXDIR}/{plugins,meta,galaxy.yml} ${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/ cd ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud/
ansible-test sanity --skip-test metaclass-boilerplate --skip-test future-import-boilerplate ansible-test sanity -v \
--skip-test metaclass-boilerplate \
--skip-test future-import-boilerplate \
plugins/ docs/ meta/ scripts/ tests/