Commit Graph

26 Commits

Author SHA1 Message Date
Jeremy Stanley e21c6138cc Pin ansible-compat<4 until we upgrade ansible-lint
There was a regression introduced in ansible-compat v4 which stopped
ansible-lint from working. This was fixed in ansible-lint 6.16.0 but
we've pinned it for so long now that there are a lot of rule
violations to fix or mark for skipping. In the interim, pin back all
new versions of ansible-compat until someone has time to fix things
or rip out ansible-lint entirely.

Change-Id: I62c3ca8731f237ba19868db5d0388d130ea0f214
2023-05-16 21:32:08 +00:00
Clark Boylan d4433dfe34 Exclude more broken ansile-compat library versions
It appears that they are proceeding with new releases and not fixing the
issue.

Change-Id: I0ba9f1a6d92bf619bf86840c7ca6649117dc6d94
2023-05-08 09:21:06 -07:00
Ian Wienand 5e012776ad
flake8 : ignore .cache subdirectory, avoid broken ansible-compat
This role pulls in zuul-jobs/system-config, etc. for roles into
.cache.  We don't want to flake8 them as part of this job; ignore the
.cache subdir.

This also avoids a broken release of ansible-compat per the linked bug
(I'm assuming the next version will fix it, so optimistically not
using <)

Change-Id: I5cf3029e40fcc0e02ba4d104beb59a1c75509a77
2023-05-02 12:49:16 +10:00
Jeremy Stanley 6ced4627bd Address breakage due to ansible-lint 6.5
Pin ansible-lint<6.5 for now due to the
https://github.com/ansible/ansible-lint/issues/2320 regression which
ignores our skip tags.

Also add the zuul.d directory to the list of directories to avoid
linting, since those YAML files aren't Ansible files and it doesn't
seem to know not to try parsing them anyway.

While we're here, "fix" a task name not starting with an upper-case
letter, which for some reason ansible-lint now seems to think is
important. If we decide to continue using ansible-lint, it's
probably going to persist in complaining about that.

Change-Id: I46826210dfa4442af5c36d1439d1a1047ca0ba90
2022-09-07 19:22:50 +00:00
Ian Wienand 34a45ddb78 linters: update to ansible-lint 6
This updates to ansible-lint 6.  Similar to
I972f73037b9f904a555b81f3835ca5261639ed01 it provides a helper for
installing required roles for linting.

There is no need for a separate syntax checking step, as that is done
by ansible-lint.

Change-Id: I270c50bd5b3ac8db583bc2ba48e254175c91db03
2022-07-28 15:24:38 +10:00
Dr. Jens Harbott 8b6c827ecf Cap ansible-lint below 6.0
Capping <=6.0 never made sense anyway, also with ansible-lint==6.0.0
things are breaking now because it requires newer ansible.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Ifb4ab923fe438c22f52b5a9099bbd9b82cba7138
2022-03-15 14:36:07 +01:00
Clark Boylan 1bc98d2ee8 Update ansible-lint to fix deps problem
Older ansible-lint has an uncapped dep on 'rich' and newer rich breaks
ansible-lint. New ansible-lint has addressed this. We update
ansible-lint to get those fixes.

This adds task names to a number of tasks to correct a linting error.

Change-Id: I38284fef54213e0fceb1b348d5839129cc15148e
2022-01-10 12:00:49 -08:00
Sorin Sbarnea 885e48c1b6 Refreshes calling of ansible-lint
- Assure compatible version of Ansible is installed
- Make use of ability to detect roles and playbooks in linter, which
  also makes it execution ~9x faster.

Change-Id: Ife53d9f3161f6531102ed82f62f5d91c805e6cdc
2020-11-02 10:01:57 +00:00
Andreas Jaeger 05496ba464 Update to hacking 3.0
Hacking 3.0 was just released with minor changes, update to the new
version.

Change-Id: Ia3e43bdc76c84cd073fe0095dab62d07cc391a2d
2020-03-31 13:44:46 +02:00
Monty Taylor 9a49d142b2 Use a fake zuul_return and an .ansible-lint file
ansible-lint now supports settings in a file, including exclude_paths.
This lets us simplfy the ansible-lint command. Also, stop installing
zuul and just use a fake zuul_return to fake out ansible-lint.

Change-Id: I40291d4e861fe9e6e3341b075ab7d6c9f5315275
2020-03-12 07:29:39 +00:00
Zuul 0dba4fbe3b Merge "Update ansible-lint" 2020-01-24 09:33:59 +00:00
Andreas Jaeger 3e151e9818 Increase hacking version
Let's use hacking 2.0 to get newer Python3 pep8.
Fix the one error found (E305: expected two lines...).

Change-Id: Iebe51ede1e80ce256a1f6015746e8ed62a3d946b
2020-01-19 17:03:30 +01:00
Andreas Jaeger 1dde1e30e9 Update docs building
Switch from python setup.py to calling sphinx-build directly, add
a new doc requirements.txt file.

Change-Id: I199b8ceff5740c775804ff0db52704df8cbd7b86
2020-01-19 16:55:45 +01:00
Ian Wienand 0bbbe0e9b1 Update ansible-lint
I started looking at this because what I thought was an ansible-lint
bug is an ansible bug (you can't use a apostrophe in shell
comments?!...)

Anyway, the ignore numbers have changed and we don't need to enforce
pipefail.  Otherwise it found some variable typos.

[1] https://github.com/ansible/ansible/issues/28674

Change-Id: I35315c82200686841a9b1d4c87c7f27a71bd8931
2020-01-15 13:24:49 +11:00
Andreas Jaeger eda66881c6 Update ansible and hacking versions
We run ansible 2.7 with zuul, so update the version we use for linting.

Update hacking to current versions to get new versions of pep8 as well.

Change-Id: Ibc42a11ab2f8ea42762869920a7d1c7f339c5efe
2019-05-17 16:38:06 +02:00
James E. Blair 4f39642446 Update zuul ansible location
With multi-ansible support, the location of the zuul plugins/modules
has moved.

Change-Id: I8e2cf1f2276bca5a912fed52062628b3b9d0d6d9
2019-03-18 10:13:06 -07:00
Monty Taylor 7fdfe583a3
Pin ansible-lint to <4
While we deal with the fallout.

Change-Id: I96bf361452cc3a3e277d2187d88449bd46de0d0d
2019-01-05 00:37:30 +00:00
Monty Taylor d07d6d65ef
Add zuul to test-requirements for linting
The linters env is picking up zuul-jobs content too, so we need to add
zuul to get the zuul_ modules ... otherwise ansible-lint has a sad.

Add zuul to test-requirements like is done in zuul-jobs. Then point the
library path to zuul/ansible/library in the site-packages dir from tox
so that we pick up the right files.

Change-Id: I7a4f0159290d67354e0a73365091a0d1718762fd
2018-10-18 10:40:00 -05:00
Paul Belanger f769c9d0f4 Create openstack-zuul-jobs-linters jobs
This will be a cross repo linter jobs for openstack-zuul-jobs,
project-config and zuul-jobs.

Each repo will be able to run this job, which sets up all our projects
roles in the correct locations.

Depends-On: I59e5d41a9539671ee5aab9b9036379eb9101d021
Change-Id: I16186c929e7d0e6e34b35271559e555255a52b00
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-10-24 06:37:20 +00:00
James E. Blair 591170b848 Add project-templates to docs
Change-Id: Id7e0606674d45aaf7bb6a67b852f02ef1adf5c85
2017-10-18 14:03:11 -07:00
Paul Belanger b1912315cb Cap ansible<2.4.0 for linters job
We don't support ansible 2.4.0 right now, so cap it for now.

Change-Id: I21831b534e0a6a094db9e1a3af0984e459f9490a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-25 19:04:21 -04:00
James E. Blair 42c5d53e58 Create docs
We had not completed the doc bootstrap on this repo.

Change-Id: Id83965b9c3ec6389bb8bfaf6916150f763b03461
2017-09-11 13:13:03 -06:00
Paul Belanger f67d09d315 Create publish-openstack-python(-branch)-tarball jobs
These 2 jobs will be used to copy release / branch tarballs to
tarballs.o.o.

Branch tarballs will only copy *.tar.gz, while release jobs will copy
both *.tar.gz and *.whl files.

Change-Id: Ic879302a2006b737ee4364cea067a00ebe198951
Depends-On: Ia79802dd386dbf1287af16a59985ce99a7dd4899
Depends-On: Ic7fc31a372de29a3a97ef84539faf3b0a1d6e181
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-10 13:19:08 -04:00
Paul Belanger c913d42c39
Run ansible-lint under pep8 envlist
Start linting our ansible playbooks, this is helpful to find basic
syntax / formatting errors.

Change-Id: I147a303841ac70ee59177c56d24758e73c04205b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-22 16:50:20 -04:00
Paul Belanger 5ca3b67305
Initial commit for docs
Start creating the structure needed to run tox-docs on our project.

Change-Id: Ia9431073189be91fbfdd36fa0781e4bd504adedb
Depends-On: I5999b95cd1e8140118ed65cd35ff87931da79d52
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-19 17:03:53 -04:00
Paul Belanger c5e55d75b3
Import playbooks from feature/zuulv3 development
We have been using the following ansible playbooks for testing
feature/zuulv3 of zuul.  This commit copies the playbooks from zuul
and imports them here.

Change-Id: Ib776cdce10b1f05501c46f6cf359723960f1bc71
Depends-On: I11da723df8823091f25e2a630e80ee4270d99a9b
Depends-On: Ic03634dd02d2eb1fa5aa8a38f4beb5f0ec5582c6
Co-Authored-By: Andreas Jaeger <aj@suse.com>
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-04 15:56:32 -04:00