Commit Graph

23 Commits (b105549ed858eb034d97f5fcad4890e17ee2ebfd)

Author SHA1 Message Date
Guillaume Abrioux 04d77dcaeb travis: enforce ansible-lint 4.2.0
Let's pin to 4.2.0

(because of ansible/ansible-lint/issues/966)

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2020-08-18 10:29:19 -04:00
Dimitri Savineau 296aa13b3c travis: use tests/requirements.txt
Explicitly install ansible-lint pytest pytest-cov via pip results of a
specific pytest version (4.3.1) which is not supported for pytest-cov
(2.10).
Because we are already defining a specific pytest version in the tests
requirements then we can install all the python dependencies from that
file and remove this from the pip install command.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2020-06-19 18:10:55 -04:00
Guillaume Abrioux 8d556b0787 tests: report coverage status for unittests
This commit adds pytest-cov usage in unittests

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2020-05-16 07:31:57 +02:00
Dimitri Savineau c61db12c09 travis: drop python2 support
Since python2 is EOL we can drop it from travis CI matrix.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2020-01-15 10:42:51 +01:00
Dimitri Savineau dd97353574 travis: add python 3.7 and 3.8
Add both python 3.7 and 3.8 in the travis matrix testing.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2019-11-25 09:17:19 +01:00
Dimitri Savineau 6ce4fde820 move library/plugins tests files under tests dir
To avoid unnecessary ansible warnings during playbook execution we can
move the library and plugins test files under a different directory.

[WARNING]: Skipping plugin (plugins/filter/test_ipaddrs_in_ranges.py) as
it seems to be invalid:
cannot import name 'ipaddrs_in_ranges'

Closes: #4656

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2019-10-28 09:23:17 +01:00
Dimitri Savineau 3969470fca travis: fail on ansible-lint errors
If ansible-lint reports an error then it's skipped. We should fail in
this case.

This patch also fixes the pipefail lint in the rbd mirror role

[306] Shells that use pipes should set the pipefail option

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2019-10-21 13:26:02 -04:00
Dimitri Savineau f7fd0b6d4f lint: fix error [303,602,701,702]
[303] mktemp used in place of tempfile module
 [602] Don't compare to empty string
 [701] No 'galaxy_info' found
 [702] Use 'galaxy_tags' rather than 'categories'

This patch also changes the ansible log_path value via the
ANSIBLE_LOG_PATH environment variable in the travis configuration to
avoid warnings.

[WARNING]: log file at /home/travis/ansible/ansible.log is not writeable
and we cannot create it, aborting

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2019-10-15 10:07:52 +02:00
Harald Jensås e695efcaf7 Replace ipaddr() with ips_in_ranges()
This change implements a filter_plugin that is used in the
ceph-facts, ceph-validate roles and infrastucture-playbooks.
The new filter plugin will return a list of all IP address
that reside in any one of the given IP ranges. The new filter
replaces the use of the ipaddr filter.

ceph.conf already support a comma separated list of CIDRs
for the public_network and cluster_network options.

Changes: [1] and [2] introduced a regression in ceph-ansible
where public_network can no longer be a comma separated list
of cidrs.

With this change a comma separated list of subnet CIDRs can
also be used for monitor_address_block and radosgw_address_block.

[1] commit: d67230b2a2
[2] commit: 20e4852888

Related-To: https://bugs.launchpad.net/tripleo/+bug/1840030
Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1740283

Closes: #4333
Please backport to stable-4.0

Signed-off-by: Harald Jensås <hjensas@redhat.com>
2019-09-27 10:11:53 +02:00
Dimitri Savineau 07c6695d16 Remove NBSP characters
Some NBSP are still present in the yaml files.
Adding a test in travis CI.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2019-07-26 16:09:23 -04:00
Dimitri Savineau 4cca366102 travis: Remove galaxy lint rules repository
The galaxy-lint-rules github repository isn't used anymore and has
been archived.
All the rules are now part of the ansible-lint project.

https://github.com/ansible/galaxy-lint-rules
https://github.com/ansible/ansible-lint

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2019-03-26 11:08:38 +00:00
Dimitri Savineau 676b4c979b travis: Add python 2.7
Because we're still using Linux distributions with python 2.7 (like
CentOS/RHEL 7) it could be useful to run travis tests against python
2.7 even if the support will be ended in 2020.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2019-03-06 02:25:55 +00:00
Christian Berendt 6f994195d1 travis: remove sudo: required
The sudo keyword will be fully deprecated.

https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
Signed-off-by: Christian Berendt <berendt@betacloud-solutions.de>
2018-12-04 17:10:58 +01:00
Sébastien Han bd98193ce4 travis: run modules unit tests
Travis now runs our modules unit tests to make sure they always pass.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-12-03 14:39:43 +01:00
Sébastien Han 76de421db1 lint: don't lint 204
Ignore linter warnings when line length is > 120 chars.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-11-08 10:22:02 +00:00
Sébastien Han 1f8d58002c travis: add ansible-galaxy linter
Run the same rules as the galaxy.
If the rules return an error then the roles who be uploaded to the
galaxy so we must make sure they pass.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-11-08 10:22:02 +00:00
Sébastien Han 9e87a5ae5e travis: add ansible-galaxy integration
This instructs Travis to notify Galaxy when a build completes. Since 3.0
the ansible-galaxy has the ability to build and push roles from repos
with multiple roles.

Closes: https://github.com/ceph/ceph-ansible/issues/3165
Signed-off-by: Sébastien Han <seb@redhat.com>
2018-10-30 13:45:30 +01:00
Sébastien Han b8a203bacf contrib: rm script push-roles-to-ansible-galaxy.sh
The script is not used anymore and soon Travis CI will do this job of
pushing the role into the galaxy.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-10-30 13:45:30 +01:00
Sébastien Han 6707c82fa0 ci: remove travis
since now we have the ceph CI taking care of the syntax check we don't
need travis anymore. Thanks Travis you served us well!

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 9fbe65cb72e01c586af3a27788c8e3e9549e0abf)
2016-12-06 10:17:50 +01:00
Sébastien Han 9336d80cd6 Fix Travis
Only do syntax check now.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2015-01-21 16:33:26 +01:00
Leseb c34d16f08f Revert "Fix Travis run" 2015-01-21 16:17:40 +01:00
Sébastien Han 965df5579c Fix Travis run
Fix travis run and effectively test the playbooks.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2015-01-21 16:15:55 +01:00
Sébastien Han 2c1d98f07d Add test to the playbooks
Through Travis.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2015-01-21 09:59:42 +01:00