38 Commits

Author SHA1 Message Date
Ivan Anfimov
67b7ec5e58 tox: Drop basepython
Python 2 reached its EOL long time ago and we no longer expect any
user may attempt to run tox in Python 2.

Removing the option allows us to remove ignore_basepython_conflict.

Change-Id: I54c0581e77c924f9d98975964e4470e89fa3d954
Co-authored-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
Signed-off-by: Ivan Anfimov <lazekteam@gmail.com>
2026-01-24 12:53:27 +00:00
Austin Jamias
b2aac80b41 Fix tox.ini linters_2_18 config
Correct a typo where linters_2_18's requirements were not being
referenced correctly.

Change-Id: I1c7a7555c9effd4f0ceb417be709059aa10d0a5e
Signed-off-by: Austin Jamias <ajamias@redhat.com>
2025-11-10 19:45:36 -05:00
Sagi Shnaidman
4074db1bd0 Replace 2.16 jobs by 2.18 Ansible jobs
Change-Id: I4cae065e961a06d44792bef2e6479c30fe242911
2024-12-13 21:41:53 +00:00
Sagi Shnaidman
2d5ca42629 Fix CI and add 2.16 Ansible job
Change-Id: Idcb5d2db4a92084239b80703be6a80de3e9f1116
2024-12-10 17:00:47 +02:00
Jakob Meng
7945d7f01a Improved compatibility with both tox>3,<4 and tox>=4
Tox>3,<4 does not support dots in generative envlists and tox>=4 changed
its behaviour when it detects hyphens in env names [1].

[1] 0580121601/src/tox/tox_env/python/api.py (L130)

Change-Id: I63ad716415755d2a140a6ade97d22bd18236a0df
2022-12-30 10:38:58 +01:00
Jakob Meng
94c150b2e7 Allow all external commands in tox
Change-Id: I76e0fc0e574d791e8f4d83ccc22289fa06360709
2022-12-10 11:48:48 +01:00
Jakob Meng
a03dd05465 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
2022-03-31 10:35:16 +00:00
Jakob Meng
938abd0d84 Reenabled check-import.sh which tests imports to Ansible Galaxy
Reverted commit 1f3417cdef [1] which disabled check-import.sh script.
Python module galaxy_importer will return a non-zero return value on
errors since commit 4f5fd0f29c [2].

Use galaxy-importer 0.3.1 for Ansible 2.9 and galaxy-importer 0.3.2
for later Ansible releases because galaxy-importer moved from ansible
2.9 to ansible-core 2.11 in 0.3.2 [3].

Ref.:
[1] 1f3417cdef
[2] 4f5fd0f29c
[3] 9893354783

Change-Id: I898149727d80cd7effe6a04ca77a13ef1774e781
2022-03-29 13:20:41 +00:00
Jakob Meng
749f04bcfb Added job variants for stable/1.0.0 branch to Zuul CI config
Releases of OpenStack SDK on PyPI will soon switch to the 1.*.* series
which our stable/1.0.0 branch is incompatible with. Previously, in
commit 0f532d10f3, several jobs have been changed to run on master
branch only.

This patch adds siblings jobs for our stable/1.0.0 branch which
pull the latest SDK releases of the 0.*.* series from PyPI instead.

Ref.: 0f532d10f3

Change-Id: Iefc6acfa4c25eb5d9ab062a3bfa655be2188cb77
2022-03-29 07:32:06 +00:00
Sagi Shnaidman
980536c32e Move CI to use Ansible 2.12 version as main
Move only from victoria, since Ansible 2.12 is installed with
py > 3.8.
Remove ussuri from voting jobs, use it for experimental only.
Change-Id: I74b7272794ea5fbafb7d81a5cf0068c09130bb0d
2021-10-04 15:05:51 +03:00
likui
292aabb477 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: Ia8700e03773398bc9347259bc504ae56c0978882
2021-08-09 20:08:27 +08:00
Sagi Shnaidman
0441403c42 Run ansible devel sanity tests on py38
And fix some module typos.
Disable voting for octavia jobs till investigation.
Change-Id: Ie4cb69aa2337b0f951ac194cf456e4515dbc24fb
2021-08-03 01:32:31 +03:00
Sagi Shnaidman
5ef192f1f2 Add automatic release job triggered by tag
Currently put it in pre-release pipeline to test that it's ok.

Change-Id: I791478464ed59933273bb0e5f88f3636074c6729
2021-07-28 15:11:07 +03:00
Sagi Shnaidman
17a1d72b1c Prepare for Ansible 2.11 tests
Change-Id: I3914db6e5c4f279f2aeae051fd6a1a4254f554c9
2021-04-08 00:19:24 +03:00
Sagi Shnaidman
6117f7062e Move CI jobs to base on Ansible 2.10 release
Change-Id: Ib1884a1a7b69044cf7d0ac9469c677593339eb5c
2020-11-23 21:50:57 +02:00
Sagi Shnaidman
1f3417cdef Temporarly disable check-import
check-import has ansible as a dependency, which installs only
2.9 ansible version and it conflicts with higher ansible versions
Issue to check-import will be submitted to have ansible-test as
a dep.
Change-Id: Ide46a8a6b45677e82e57eb6a4c5dfe412d7b37fd
2020-07-26 11:49:18 +03:00
Sagi Shnaidman
01c2499fb6 New CI jobs configuration
Change-Id: Ib6850184faf1bc0808502c098d610a5e2f41f47e
2020-06-23 12:27:04 +03:00
Sagi Shnaidman
c9da50e7e7 Add setup.py for install with pip
Make possible installation with pip.
Change-Id: I8eec015142c4f29eadff0dac2781782b76dea308
2020-06-04 14:23:23 +00:00
Monty Taylor
a033a0804b Validate that we can upload build collection
Run galaxy-importer on the built artifact and fail if galaxy is
going to fail.

Remove license_file entry in galaxy.yml

Change-Id: I6c2ac22ccb56f52f8efcefc5891b10875ae8c0b5
2020-05-19 11:13:22 -05:00
Monty Taylor
8a928ef70d Build collection with 2.10 and ignore things more better
We need 2.10 for building collection tarballs with build_ignore.
Also, build_ignore takes globs, not leading filepaths, so add
globs to the dirs in our list so that we properly don't include
these.

Change-Id: I809e100fa80bffafda4002487590a6dcd6aea0c1
2020-05-15 07:48:36 -05:00
Monty Taylor
6271268567 Run linters in a temp dir instead of an install
We can't run linters in an install because installs expand
symlinks to regular files so the ansible-test code that detects
symlinks can't work so it looks at docs for symlink aliases
as if they were real.

Change-Id: I0a5659a1f693261a21a5b29528f950b846205f2e
2020-05-12 09:04:54 +00:00
Sagi Shnaidman
347347b46e Fix ansible sanity linter tests
Change-Id: I2d08fdc77d930378be515da697c1cf975dd8b4d2
2020-04-02 13:20:01 +02:00
Monty Taylor
cf7011a742 Cleanup functional tests
Use the openstacksdk base functional test instead of going all
the way back to devstack for our base. Also - defining a job
starting with openstacksdk in this repo is not ok - but that
probably just came from the original copy-pasta coming from the
sdk repo.

Use tox-siblings more and stop doing tox requirements of ../
things. The system is there and we can use it.

Add jobs to test against released openstacksdk and ansible, as well
as a non-voting to test against ansible devel branch.

Add openstacksdk to the test-requirements because it's super
required.

Move zuul.yaml to .zuul.yaml. This isn't a zuul jobs repo so
we should just make it a hidden file rather than a non-hidden.

Change-Id: I658bd1728629cd358bc17a7f00d282d04530d8fe
2020-03-19 12:05:57 +00:00
Monty Taylor
75cc5012e3 Update os_client_config to use openstacksdk
This never got migrated but should. os-client-config is only
on life support.

Change-Id: I2d77c9f7d147900b79a410c17cce197108c0a69b
2020-03-17 13:35:45 -05:00
Monty Taylor
97eb24ac4d Deal with collection build modifying tree
ansible-galaxy collection build modifies the contents of the tree.
Let's not go in to why this is bad, but instead just deal with it.
The issue in question is that is removes the +x bit from files in
the tree, which means you can't run a build twice in a row locally.
Shrug. Just roll with the -x and update our usage to reflect it.

Change-Id: I0f82531e99a98d656b60079fd3e94d4e3a1dbb6b
2020-03-05 15:08:32 +00:00
Monty Taylor
53affc3220 Test with and assert support for python3
Collections are new. openstacksdk as of now doesn't support python2.
We shouldn't pretend to support python2 either. If you're using
ansible new enough to use collections, you can use python3.

This release of openstacksdk only supports 3.6 and onwards, so
set that as our min.

Change-Id: I34d544ce48f25bffde8e6e0cf82cdf9a85e681c3
2020-03-03 09:28:43 -06:00
Monty Taylor
9d29e8c847 Fix H236 and remove exclusion
We haven't needed this in a VERY long time.

Change-Id: I35041c2c6ae421e7caaef3c04ffca92e2ff10e35
2020-03-01 06:22:58 -06:00
Monty Taylor
86670bcec9 Fix F401 and remove exclusion
Change-Id: Id2dbff06925ed8326e4a214aabc19d4ada5db69c
2020-02-27 13:56:48 -06:00
Monty Taylor
92d7d7caeb Fix W504 and remove exclusion
This is a topic where there are two points of view. While neither
is fundamentally better than the other in reality, what's best is
to not have any arguments about it. The tox.ini comments about 503
and 504 that were in place make the argument that:

  - 503 is intended to be disabled and 504 enabled by default
  - Donald Knuth believes 504 is the right way

Since Donald Knuth is smarter than all of us, align with 504, match
the comments in the file and turn on enforcement to keep it that way.

Change-Id: I92d4d1e82935e30ae42a0e14e641cbe36fd6e811
2020-02-27 13:56:48 -06:00
Monty Taylor
72ba76f156 Fix E128 and remove exclusion
Change-Id: I0517c0ed09d7834df763c745936793739e88ef9d
2020-02-27 13:56:48 -06:00
Monty Taylor
2527faec28 Remove F403 and F405 exclusions
Importing from * is not a thing that should be done, as it masks
errors and makes code hard to understand. There are some copy-pasta
files that violate this. Mark them with noqa for now, because we don't
actually care about them.

Change-Id: I790f88c75ea546d83e347e42df0050ad36211936
2020-02-27 13:56:48 -06:00
Monty Taylor
15f7f7fc7b Fix F841 and remove exclusion
Change-Id: I92802ced580d42781cfd875389daa232aa8a64a5
2020-02-27 13:56:48 -06:00
Monty Taylor
90e68f2e8e Run flake8 in linters
We should run flake8 when we run the other checks. This
repo is mostly python.

Change-Id: I3cbecf9ef24f784c072841656b55c4162673dcaa
2020-02-27 13:56:48 -06:00
Monty Taylor
40fe366727 Remove old artifacts when building new ones
For local dev, multiple iterations can wind up with multiple
files in the build_artifact dir. Remove them when building so
that the ls command works.

Change-Id: Id309c34679d2c0b6d9380665a381af4b52495d19
2020-02-27 13:56:27 -06:00
Monty Taylor
5936a8f691 Add a tool to build collections with pbr
OpenStack in general uses git tags to drive versioning of artifacts.
This is important because of our code review driven workflow, since
patches don't necessarily land in a predictable sequence, so flows
requiring a version number in a file to be updated at a specific
time are problematic.

By having pbr generate the correct version number then putting that
into the galaxy.yml file, we can match the behavior without too much
undue burden.

Also ignore build_artifact directory.

Change-Id: Id02fee682fb5a4b6fd6dcb0644848e6d1269e19b
2020-02-27 08:20:43 -06:00
Sagi Shnaidman
7c52b83b52 Run functional devstack job on ansible collection
Porting of job that was running on patches in Ansible.

Change-Id: Ifa5a6b40d6a0f1de9f2cbc917a55c2d0e8ac421d
2020-01-21 00:25:48 +02:00
Sagi Shnaidman
57b76835c9 Make collection tar file path version independent
Find collection TAR file by "ls".
Change-Id: Icf988005258b260b51e8de7e70b344275948b40b
2020-01-19 21:19:51 +00:00
Sagi Shnaidman
6ac08e7f0e Migrate openstack modules as a collection
Migrate accordin to Ansible guidelines [1[]] and tool
migrate.py [2]
Also fixed ALL ansible-test sanity issues

Add pep8 and linter job with runs ansible-test sanity test.

[1] https://etherpad.openstack.org/p/openstack-ansible-modules
[2] https://github.com/ansible-community/collection_migration

Change-Id: Ib2b1c8f23aacfca95304132bfe5c4cdedbea0520
2020-01-17 14:07:24 +00:00