Commit Graph

17 Commits

Author SHA1 Message Date
Ghanshyam Mann 72ea117f61 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: Ic549bdcc76a5e12a0104143fbe79fd0db2c866b0
2024-02-24 11:44:35 -08:00
Sorin Sbarnea 01c3637a88 lint: bump flake8
- Use recommended flake8 setup in pre-commit
- Removes use of hacking as pre-commit provides the lock-in
- Bumps flake8 to latest stable
- Resolves two ignored rules

Change-Id: I98f382cd2b72345748e40106624c73039e0f0f2c
2020-01-10 13:44:42 +00:00
Sorin Sbarnea 6bd8a4df1e fixed linters
- workaround for ansible-lint failure with new setuptools
- bumping linters
- consolidated linters configuration

Partial-Bug: https://bugs.launchpad.net/tripleo/+bug/1848512
Change-Id: Ic763d5b39d5059526ee5de99fec82bec7524d460
2019-10-18 10:42:29 +01:00
Sorin Sbarnea ebcf22bb69 Migrate ansible-lint to pre-commit
* Kept old specific linter tox targets for backwards compatibility,
  so developer can easily run a single linter if desired.
* Reused tox linters virtualenvs to avoid wasting space
* Moved linter config to their official location which enables
  developer to call them in any way he wants (like his IDE)
* Updates yamllint to its newer version which supports strict
* Fixed yamllint errors
* Used parsable output format on yamllint which is more consistent
  with other tools, being also recognized by IDEs and terminals.

Change-Id: I2bd44feb0a221dcd6f5402e070cf38b31fd8ac97
Depends-On: https://review.openstack.org/#/c/621930/
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
2018-12-06 20:11:28 +00:00
Sorin Sbarnea a472345db1
Repair ansible when calls with jinja2
- adopts official syntax for 'when:' commands
- assures we use current linter which spots when errors
- reverts temporary linter rule disablement
- use parsable output (pep8 like) for ansible-lint

Change-Id: I6eb5719841c2f264e1efed4bf38726f71c840e36
Closes-Bug: #1797838
2018-10-15 19:12:46 +01:00
Marios Andreou ecd5d0d806 Add ANSIBLE0019 (rule id 102) to skip list -[102] No Jinja in when
As discussed in the related bug this is currently blocking master
t-q-e gate. 

Change-Id: I8f85ed0a409d01fab7b54953c7980a1a10560951
Related-Bug: #1797838
2018-10-15 10:35:53 +00:00
Matt Young a902346e13 Make ansible linting script executable
Change-Id: I88c5c4de5950f7bea740b4a8fea3d203236c8726
2018-06-13 00:28:40 -04:00
Sagi Shnaidman 69ad943add Add ansible linter rule for set pipefail
When using pipes in ansible shell module we can miss the error
because shell is executing without pipefail by default.
This rule will check every shell module if it has "set -e pipefail"
and will fail in case if not.
It excludes tasks which have 'ignore_errors: true' or register
variables.

Change-Id: I394c72040d62dff76180aeb9d703bb8a212bcc98
2018-04-26 21:32:24 +03:00
Gael Chamoulaud d6e9333dbf Fix ansible-lint.sh to check playbooks
Playbooks were not checked with ansible-lint

Change-Id: I0a465e85550f1541051db8cbf7e76283fd0b8ee7
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-11-13 09:24:23 +00:00
Sagi Shnaidman ba0644eb7c Fix path of working dir for Jinja linters
Make jinja linters independent of working directory, so it will
be possible to run them locally.

Change-Id: I01398e2faae7564ae464cd3ac9512d1d27cba187
2017-03-19 23:54:51 +02:00
Jenkins 990c0b85ea Merge "Added script to validate jinja templates" 2017-03-15 15:05:03 +00:00
Chandan Kumar 1554cd0b03 Added script to validate jinja templates
* tox -e validate-jinja
* Added to ci-jobs

Change-Id: I799ec9e586a96800ee592522a0c1af7bd591ca67
2017-03-10 14:10:55 +05:30
Gael Chamoulaud 00d8fe4062 [LINTERS] Fix ansible-lint.sh and lint issues
This patch fixes lint issues that ansible-lint.sh did let pass and it enables
the verbose mode to see what happens.

Change-Id: Id912ecb4000a4cfeb8a4b8ab631774fd7ea5a449
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-03-08 10:58:17 +01:00
Gael Chamoulaud 7499fb582a Fix ansible-lint.sh script for roles.
- According to the ansible-lint documentation, we can pass a role directory as
  an argument. But due to https://github.com/willthames/ansible-lint/issues/210,
  the role directory has to contain a trailing slash!

- This patch fixes the following ansible-lint rules:
  * ANSIBLE0004: Git checkouts must contain explicit version
  * ANSIBLE0008: Deprecated sudo
  * ANSIBLE0011: All tasks should be named
  * ANSIBLE0014: Environment variables don't work as part of command
  * ANSIBLE0015: Using bare variables is deprecated

- Temporarily skipping the following ansible-lint rules (Fixes will be part of
  others patches):
  * ANSIBLE0007: Using command rather than an argument to e.g file
    We have a lot of 'rm' command and we should use file module instead
  * ANSIBLE0012: Commands should not change things if nothing needs doing
  * ANSIBLE0013: Use Shell only when shell functionality is required

Change-Id: I3d5591ea9fd1691e8115d7093db87781a08a6082
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-02-21 14:06:41 +01:00
Gael Chamoulaud 5533b8f7a1 Adds a Bashate target to tox.ini.
This will now run bashate on all shell scripts. We could ignore the
following list of bashate errors:

- E006: Line longer than 79 columns (as many scripts use jinja
        templating, this is very difficult)
- E040: Syntax error determined using `bash -n` (as many scripts
        use jinja templating, this will often fail and the syntax
        error will be discovered in execution anyway)

Change-Id: I6f6d454ac54a0ac98d8b8a092fa522cba092a592
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-02-07 12:23:45 +01:00
Gael Chamoulaud e0df5f7108 Add ReNo support for managing release notes in TripleO-Quickstart-Extras
Add ReNo [1] support to manage release notes
[1] - http://docs.openstack.org/developer/reno/

Change-Id: Ief133240354404d9abdc40e05bb1696c13a6b606
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-02-07 12:19:28 +01:00
Attila Darazs 661358a588 Add essential repo files
Also fix ansible-lint errors and disable flake8 checks on the files
within the roles until we fix them.

Change-Id: Iab40c0fea517b2f74b91cab7b0f443de89e453b8
2016-11-22 13:23:57 +01:00