205 Commits

Author SHA1 Message Date
Jiri Podivin
ac415ff515 Reqcheck job for upstream validations-libs
Zuul job queries the requirements.txt and the relevant
spec file using the `rdopkg reqcheck` to find discrepancies
in the listed dependencies.

Just like the original `rdopkg-reqcheck` this job is non-voting.

Depends-On: I18a2249eec77b0b7adc3a14eed530760598f972e

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I6fad1cc93e9a89cba857691dffcec5d794e69333
2021-05-20 17:22:20 +02:00
Zuul
bfd8e33a38 Merge "Retrieve n latest validation results" 2021-05-07 16:42:48 +00:00
Jiri Podivin
6bfdb04137 Retrieve n latest validation results
New optional parameter for the CLI limiting
number of validation results returned by history subcommand.

Resolves: rhbz#1944872

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ie79062e85351ed545c33001866773bf38fdf8517
2021-05-07 12:37:55 +02:00
Luigi Toscano
efca0653aa Add support for JUnitXML output (optional)
The support rely on junit_xml, which is also used by the junit
ansible callback plugin.

Change-Id: Ie484445e1b8602780c0faaeaf991b2de27032f3b
2021-05-05 11:03:26 +02:00
Zuul
36c9b8cbcb Merge "Version bumps for rhel9 transition" 2021-04-29 19:20:41 +00:00
Zuul
2c799ebe69 Merge "Raise exception if result is empty" 2021-04-27 16:51:13 +00:00
Zuul
00757aaad0 Merge "CLI colors refactored" 2021-04-27 16:50:53 +00:00
Jiri Podivin
135478c426 Version bumps for rhel9 transition
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ic3618668190dd9700b4d84551377464bac5c893b
2021-04-27 15:40:04 +02:00
Jiri Podivin
03981dba8a CLI colors refactored
Colors are now stored in their own module.
Output coloring was factored out into a separate
utility function.

State => color mapping is now implemented as a
dictionary instead of multiple conditionals.

Tests included.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I41f15c28dfddd911294ecc8e3e0331a4956dc5d8
2021-04-26 11:38:40 +02:00
matbu
6329e3b63a Raise exception if result is empty
If results is empty in cli/run.py then we should raise
a RuntimeError otherwise, it will returns 0 without any
information.

Change-Id: Ic38690bd719658fe02a30691d112f3429523802a
2021-04-23 13:50:00 +00:00
Jiri Podivin
132d2801db Invalid char '\xe2' replaced with double dash
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I4f684116b1d6fe9952490fd5f1e2ee019b0ce035
1.1.0
2021-04-21 09:38:41 +02:00
Zuul
3b8a90ad9b Merge "PDF docs are now available" 2021-04-21 05:46:38 +00:00
Zuul
8b44eeb231 Merge "Create dedicated CLI for the Validation Framework" 2021-04-21 01:42:37 +00:00
Jiri Podivin
b8710584c7 PDF docs are now available
Docs are now built in both html and pdf.
Html docs link to pdf docs.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I203942b27ddbfb540b3262c55faba509799ecc19
2021-04-20 13:35:51 +02:00
matbu
5fad1a4d18 Create dedicated CLI for the Validation Framework
This review adds a CLI for the Validation Framework which will become
the only entry point to run the Validation Framework.

It will deprecate the tripleo_validatior.py CLI and the
validation.py script.

This patch uses python cliff library to provide nice helpers, shell
and output formats.

Change-Id: I66800ad51cc50f4eb37efabe85fb553dce008101
2021-04-20 11:52:35 +02:00
Jiri Podivin
a12c531409 Exceptions now indicate cause where applicable
Potentially helping with debugging
and contributing to faster issue resolution.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I4b3db6b6416c0b81ce0397e10c833b342dbc2c0e
2021-04-16 16:47:58 +02:00
Zuul
dc2a135d42 Merge "Add vars to tripleo-ci-centos-8-standalone-validation-libs job" 2021-04-16 11:36:24 +00:00
Zuul
bb23468ee5 Merge "Expose ansible ssh_user variable to the run action" 2021-04-15 22:30:57 +00:00
matbu
d83be8b169 Expose ansible ssh_user variable to the run action
Change-Id: I6ae1f55ea261064b418e25cd4cf255f386a20fb3
2021-04-15 15:56:48 +02:00
Gael Chamoulaud (Strider)
304db541d0 Add vars to tripleo-ci-centos-8-standalone-validation-libs job
This patch adds variables to make this TripleO CI job a consumer one.

Related-Bug: #1923091

Change-Id: I01c94b85beceed34c67fddfb44ba1cf721aa9d36
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
2021-04-15 09:05:54 +02:00
Zuul
caa9fc2c96 Merge "Zuul runs tests in py36 only" 2021-04-13 18:33:47 +00:00
Gael Chamoulaud (Strider)
d5b92ff5e2 Add basic standalone job w/ validate-services true
* Parent off the basic tripleo standalone job
* turn on validate services
* Ensure changes to repo build via rpm

Related-Bug: #1923091
Depends-On: https://review.opendev.org/c/openstack/tripleo-validations/+/785722
Change-Id: Ie189a63df095ae1f38722c78873e4695a451aab9
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
2021-04-12 11:09:18 -06:00
Jiri Podivin
ca9dbbfc28 Zuul runs tests in py36 only
Python 3.6 is the oldest version of python
supported by the package, and newer, supported,
minor versions do not break any substantial functionality
by design, while introducing new features.

Therefore we do not need to run unit tests for
each minor version. As all possible issues affecting
versions >3.6 would necessarily be related to features
introduced in versions >3.6.

Victoria test template was removed from .zuul.yaml.
The pep8 test environment was folded into linters in tox.ini.
Zuul is now explicitly running tests only in one, oldest supported,
python environment, Python 3.6.

PEP387: https://www.python.org/dev/peps/pep-0387/
https://docs.python.org/3/whatsnew/3.7.html#porting-to-python-37
https://docs.python.org/3/whatsnew/3.8.html#porting-to-python-3-8

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Iec86be1b44a494c815ffff042b8693d7fc830b74
2021-04-08 11:36:20 +02:00
Zuul
18862912b3 Merge "Fixes string formatting of the error msg log" 2021-03-27 01:55:00 +00:00
Mathieu Bultel
6a2008950f Expose callback_whitelist option to Run action
The callback_whitelist is not usable via the Run action for now.
The patch allow users to pass  a list of callbacks to whitelist
during the validation run.

Altered docstrings to include changed type spec.

Change-Id: I37eb369701ccbd1d3fd4a7601a5e626d5867381d
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Signed-off-by: Mathieu Bultel <mat.bultel@gmail.com>
2021-03-21 12:30:47 +00:00
Zuul
0131dcc00d Merge "Moving doc structure closer to that in validations-commons." 2021-03-17 13:38:45 +00:00
Zuul
fbcce5894c Merge "Fix the syntax for groups in documentation." 2021-03-15 21:05:12 +00:00
Zuul
6c1b8a57c8 Merge "Default to current user dir for log creation and management" 2021-03-12 12:23:33 +00:00
Jiri Podivin
12cd88dfe2 Fixes string formatting of the error msg log
Apart from incomplete output the incorrect formatting
causes followup exception further obfuscating the original issue.
Minor issue related to:
	BGZ:1895045

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ibed0bc4b78be957819205bed76073e72820ab2a1
2021-03-10 09:13:39 +01:00
Zuul
861232b6ec Merge "Remove the condition to check the groups." 2021-03-09 14:24:03 +00:00
Mathieu Bultel
006ae40843 Default to current user dir for log creation and management
If /var/log/validations is not present on the system, then we should
default the path to something known and writable

Change-Id: I4cd854b5bdc6019697b5d210d368b1bdb4b1f4b3
2021-03-08 13:51:10 +00:00
Daniel Bengtsson
28e069f170 Remove the condition to check the groups.
The code of the groups property in the Validation class changed. Before
the code didn't check if the key groups was there. You can see the
change[1] to have more information.

[1] eb62054a33

Closes-bug: #1917785
Co-authored-by: Owen McGonagle <omcgonag@redhat.com>
Change-Id: Ib11fd1b829bd56c19f82081d53440b4dd8237f3f
2021-03-04 17:35:45 +01:00
Zuul
125bbf01c7 Merge "Refactor the groups property in Validation class." 2021-03-04 14:58:32 +00:00
Daniel Bengtsson
01103d6739 Refactor the groups property in Validation class.
Improve the code and remove the condition to check the groups. Use the
default value from the get method.

Co-authored-by: Owen McGonagle <omcgonag@redhat.com>
Change-Id: I693ba3699ab2c1b50f92b4f60f309d8c529a23c4
2021-03-04 00:21:06 +01:00
Daniel Bengtsson
7754b368c5 Fix the syntax for groups in documentation.
The groups list must be in the metadata.

Change-Id: Id64f71ad8fc02db84a18a27923919b9b03072bb3
2021-03-03 11:18:51 +01:00
Zuul
73b8a373ad Merge "Style adjustment of a constant." 2021-03-03 08:52:20 +00:00
Zuul
a5fcd54131 Merge "Return absolute path for inventory" 2021-02-25 17:51:04 +00:00
Jiri Podivin
bcd6d6e857 Moving doc structure closer to that in validations-commons.
After merge of 723586 anyway.

Specific changes include:
new readme.rst in doc structure
tox adjustment
license info
bugtracking and source links
date update
badges
CONTRIBUTING.rst
ansible_autodoc.py
release notes infrastructure

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Ia3db253e05d0f8d754259ff841a783f29cd6a70f
2021-02-25 13:11:34 +01:00
Zuul
18d1a759e5 Merge "Modifies README.rst to reference podman." 2021-02-25 10:28:19 +00:00
Zuul
04fe68c944 Merge "Docker image refinement and preparation for future development." 2021-02-25 10:28:09 +00:00
Zuul
2d34c59bf1 Merge "Improved Dockefile and simplified use instructions." 2021-02-25 10:25:49 +00:00
Zuul
c21673ae16 Merge "Removed unnecessary second check." 2021-02-24 13:39:06 +00:00
Zuul
c54307403a Merge "show command now properly uses list of validations" 2021-02-18 16:51:15 +00:00
Mathieu Bultel
3b2d2475e6 Return absolute path for inventory
Is the inventory is passed with a relative path ansible
wont be able to find the file, we need to return the
absolute path in that case.

Change-Id: I3a99ac5b73b5a8d32434db15f78e14a7366e2925
2021-02-18 15:45:21 +01:00
Zuul
58c757cdee Merge "Add skip list option in order to provide a black list for validation" 2021-02-18 09:03:46 +00:00
Mathieu Bultel
618cde0569 Add skip list option in order to provide a black list for validation
Should be formed as:
{'xyz':
  {'hosts': 'ALL',
   'reason': None,
   'lp': None}
}

Change-Id: I030344ad3ec117548b78284cb4f12265a0719c3a
2021-02-17 16:36:41 +01:00
Zuul
ee8e9ec7d9 Merge "One of the two nested calls of os.path.join was redundant." 2021-02-16 22:32:05 +00:00
Jiri Podivin
c36ac52d91 Modifies README.rst to reference podman.
Thank you dpeacock for pointing out this oversight.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I9ae7309495458ba35a723e13c94d9dc85c8c45e9
2021-02-15 15:29:34 +01:00
Jiri Podivin
f60caf8e66 show command now properly uses list of validations
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Iced465a7380acc2bd7065c1fc2dc34e6ddcd9b15
2021-02-15 14:03:55 +01:00
Jiri Podivin
4405071de0 Docker image refinement and preparation for future development.
.dockerignore file was added to limit size of the docker context
The more complex docker images will be placed in newly created
dockerfiles dir. Each in its own subdir
and accompanied with README.rst file describing their use.

Right now there is only one, the same as the one in repo root.
But in the future there will be more.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I5ed91d4258d9ad6725a86d5c3c6a40a02212b5d4
2021-02-12 12:48:00 +01:00