Commit Graph

34 Commits

Author SHA1 Message Date
Ghanshyam Mann a606c60efc 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

Depends-On: https://review.opendev.org/c/openstack/ansible-role-collect-logs/+/910044
Depends-On: https://review.opendev.org/c/openstack/neutron/+/910099

Change-Id: I338ed19678cf4a6248c46551bdf9cb23abc511bd
2024-02-24 20:22:39 +00:00
Douglas Viroel 941bbcdfff Fixes for ansible-lint in tox linter job
This patch updated ansible-lint version on pre-commit configuration
file and updates tox.ini to install ansible and collections needed for
ansible-lint validation.

Closes-Bug: #2019875

Change-Id: Ib68f5b26ea5672d294709a8a1d7e725133be0203
2023-05-16 14:46:18 -03:00
wu.shiming 4e65064ebf 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: I2b1807cb2e8c0bc31142a071cde87a700d34996d
2021-11-08 06:23:55 +00:00
Sorin Sbarnea 6984eadf13 Pin test dependencies
Change-Id: I5474e093a5fbd1e6cefb8984ea6cec3628e192a7
Story: TRIPLEOCI-514
2021-06-28 13:10:15 +00:00
Marios Andreou 57d0c46968 Revert "Adds tripleo-get-hash module get tripleo-ci hash info from tag"
This reverts commit 4cf80d855a.

Reason for revert: The code is now merged into tripleo-repos at https://review.opendev.org/c/openstack/tripleo-repos/+/789535

Change-Id: I22aca766019e293e8a9478cae29de392dac9412c
2021-05-07 10:40:28 +00:00
Marios Andreou 4cf80d855a Adds tripleo-get-hash module get tripleo-ci hash info from tag
We want to replace the current ansible role and bash scripts
that fetch the hash for us in tripleo CI jobs.
This tripleo-get-hash module will be packaged to pypi, then used in
an ansible python module to replace the current ansible invocations
of get-hash.

Change-Id: Id7c7192bec43052af50e37196ff5761c6baa4ffe
2021-04-29 12:33:49 +03:00
Sorin Sbarnea cc0d019446 Add py39 support
- update setup.cfg to advertise supported platforms
- fix tox.ini file use version agnostic envlist
- add openstack-tox-py39 job
- minor fix on test file which wrongly assumed that pop
  returns a new dictionary
- added type to release dictionary, which is what would
  have prevented previous item from being introduced.

Change-Id: I60b80ebe41a66d39e6f1a51a3d00c0b9292d42fd
2021-04-12 18:42:38 +01:00
Rafael Folco d227115b1d pytest-html report for tcib container builds
Consolidate tcib build results in a html report running
pytest to check if the containers were built. For each
container image, a test is run to check if the image exists
and a link to the logs is attached to the report.

As part of the container build simplification and usability
improvements, the kolla and tripleo building methods have
been split into separate templates.

This change also removes the dry-runs in the build script that
were supposed to get the list of expected containers. Instead,
we replace the dry-runs with the tripleo_containers.yaml file.
This avoids confusion in counting expected containers vs the
actual built ones.

Change-Id: I1bb9353c2b5c79f55ab39d9cfcaa8f9617c28a34
2020-12-17 12:32:21 +00:00
Sorin Sbarnea e5217e01a4 Refactored tox jobs
- assure we test triple-jobs-gerrit.py file
- fix division by zero bug with above file
- simplified tox.ini file
- prevent accidental regression on CI by checking number of passed tests
- removed test_molecule.py file which was the precursor of what later
  become pytest-molecule

Change-Id: Id6ffb9df88a376bcd3c8a0d77b2d378fca8da115
2020-03-27 13:39:35 +00:00
Gabriele Cerami 50203ab44a Add centos8 support for emit_releases_script
emit_releases_file needed to be updated to support centos8 and
integration pipeline.
I needed to make the script distro aware, then distringuish between
distros to get the proper repo and hash in get_dlrn_hash function.
The tests have been only partially updated: I updated the success script
to cover the centos8 case, and accountfor the change in signature for
get_dlrn_hash, but the rest of the workflow is exaclty the same either
if we are in centos7 or centos8, so I did not add any additional checks.

Change-Id: I26799d5e6a3ed404b4a29be621c5871ef9be6e4c
2020-03-06 12:23:55 +00:00
Sorin Sbarnea f9f9773575 Upgrade molecule to 3.0a9
Bump molecule to newer version release to avoid the few buggy releases
in between.

Change-Id: I4cbfd299af4ac9d65e36ce3721d1809992e1b86f
2020-02-17 16:54:20 +00:00
Sorin Sbarnea 9273389939 Bump molecule
Change-Id: I424846750072088035b48f1cf600397125745d6a
2020-02-06 22:42:19 +00:00
Sorin Sbarnea 7b84c23443 lint: maintenance chore
- reverted previours workarounds
- assures we run ansible-lint on our files
- bumped linters
- fixed new problems found by the linters

Change-Id: I7812fcfd17569b0c438f58bec73ab0f4b07e625c
2019-11-11 18:01:00 +00:00
Sorin Sbarnea 747f4b87c9 fixed linters
* implemented workaround for https://github.com/ansible/ansible-lint/issues/590
* bumped linter versions
* added missing proxy variables to passenv
* removed uneccesary use of hacking with flake8 hook

Change-Id: I3f50f27bf349be6ceb5dc303e206ec83abe3c458
2019-10-17 12:42:16 +01:00
Sorin Sbarnea b5777f8519 Adds tripleo-repos molecule test job
Adds local method for testing the validity of the modified roles via
molecule on supported platforms.

This change is adding a pytest that calls molecule to validate
tripleo-repos role on supported platforms.

On CI this change uses a local docker installation but if the developer
wants, (s)he can just define a DOCKER_HOST=ssh://user@server variable
to enable remote execution of the containers (tested).

Change-Id: I2acecc16064b3f155de3e82368c64b060304a5e2
Story: https://tree.taiga.io/project/tripleo-ci-board/us/805
Depends-On: https://review.opendev.org/#/c/663599/
2019-06-11 14:32:34 +01:00
Sorin Sbarnea 2b6218c320 Avoid tox failure on systems where python3 points to python3.4
Solves bug where linters environment was failing on CentOS 7 because
python3 pointed to unsupported py34, even when user may have already
intalled other newer python3 versions.

By changing the preference order of python interpreters in envlist, tox
will pick them and avoid using invalid version.

This means that running just 'tox' is like to run correctly on most
systems.

Change-Id: I20792de6e446b6908b08e88c29ae14852ffd58a4
2019-05-24 14:18:38 +01:00
Sorin Sbarnea b7dd8658e9 Avoid annoying pip warnings
Disable two annoying pip warnings which are kinda pointless.

Change-Id: I8dd72e4f81094be53a78522237da54104c0a6eee
2019-04-25 11:13:47 +01:00
Sorin Sbarnea f39cd8a9c3 Make pytest run generate html reports
Improve readability of pytest executions by producing html reports
which are also advertised by zuul, saving user time.

Change-Id: I306ad28c855c59f3d575da7a6132782ce02966d7
2019-04-16 09:22:07 +00:00
Sorin Sbarnea be9d4d6d2b Refactored tox.ini to ease usage for developer and CI
* Fixes ocassionally pre-commit linting was broken after a merge (-a)
  By always running on all files we avoid this rare case from happening.
  As seen on https://review.openstack.org/#/c/636160/55

* Fix minor bashare identation error that slipped in due to previous
  issue fix.

* Adds .eggs/ to ignore

* Moves whitelist_externals at top level to simplify tox.ini file

* Adds missing file patterns for tox py27/py35 job

* Avoids repetition of file patterns between py27/py37 jobs.

* removed pyflakes as this is included in flake8

* Running just "tox" now works even if developer has alternative python
  versions like py36/py37 instead of py35. No impact on CI where job
  is forcing use of specific interpreter.

* Remove bindep tox env and include bindep run as part of unittest
  environments. This will assure it runs on CI, as it previously din't.

Change-Id: Ia8f98fc0fda18203be3c17d4fdb93d33ca244dc4
2019-04-03 14:53:01 +01:00
Quique Llorente 4381539ba5 Add stein support to emit releases script
It's the first release that supports standalone and also LTS has not
change and it's still for queens only.

Story: https://tree.taiga.io/project/tripleo-ci-board/us/847

Change-Id: Id246cdab8a574ed57cd90813652532f47fbd0643
2019-04-02 15:12:59 +02:00
Sorin Sbarnea e8451873fe Improve tox usage for development
Adds ignore_basepython_conflict tox.ini in order to avoid conflict
displayed if tox is run on machine that is using py36 or py36 default
interpreter instead of py35.

Ignores missing interpreters as developer may not have the full
range of python interpreters installed.

This change has no impact on CI execution as there tox is always
called with specific environments.

Change-Id: Ibb3c17632b7a15de698218bcb987aece75eec623
2019-03-01 10:50:39 +00:00
qingszhao 63eb796c99 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I6a4531e148cf2695bbf5fea34ee8b539942bbc39
Closes-Bug:  #1801657
2019-01-11 06:02:10 +00:00
Zuul a534135fb4 Merge "[Configuration] Fix tox python3 overrides." 2019-01-02 12:37:30 +00:00
Sorin Sbarnea ed27a979d5 Adopt use of pre-commit linting
Follows the same configuration that was used on
tripleo-quickstart-extras and documented use on tripleo-docs.

Change-Id: Iba8a2db92137f9f6ad28f498627eb1b87039d99f
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
2018-12-14 15:50:06 +00:00
Natal Ngétal 61a55462e5 [Configuration] Fix tox python3 overrides.
We want to default running all tox environments under python 3, so set
the basepython value in each environment. We do not want to specify a
minor number, because we do not want to have to update the file every
time we upgrade python. We do not want to set the override once in
testenv, because that breaks the more specific versions used in default.

Change-Id: I619708463e67bcdc3527222b1a7ecde32070694a
2018-12-11 11:36:25 +01:00
Jiri Stransky c6bc5f8ace Reduce unit testing changes required for emit_releases_file
When looking at recent edit of emit_releases_file.py it seems that the
amount of manual unit test changes required [1] is so high that it
might deter contributors and consume too much effort.

Much of the edited unit test data seems repetitive, so my rationale
here is that we can reduce the amount of data resulting in a small
loss of coverage but considerable reduction of required labor when
making emit_releases_file amendments.

The order of side effects for get_hash function was considered for the
test result, now we use a fixture that is backed up by a tuple to a
string dictionary to configure the mock, so the order is not important
anymore.

Co-Authored-By: Quique Llorente <ellorent@redhat.com>

[1] https://review.openstack.org/#/c/606996/7/scripts/emit_releases_file/test_release_name.py

Change-Id: Ie573813a4916aeb1bb15b5aa38dc2a732586e8c2
2018-11-05 09:07:43 +00:00
Sorin Sbarnea db10400e88 Use python3 for tox linting
fix tox python3 overrides We want to default to running all tox
environments under python 3, so set the basepython value in each
environment. We do not want to specify a minor version number, because
we do not want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that breaks
the more specific versions used in default environments like py35 and
py36.

Also, add tox-linters job to gate so that changes like this can merge.
The files section limit what runs - and if *nothing* run, there's no +2
from CI. Another reason to add this job is that we run voting jobs in
both check and gate, and this one was only in check.

Change-Id: I742695bfcd071c4930c4170553af7d9a59f6a432
2018-09-24 08:13:16 +02:00
Sorin Sbarnea 04e2fcf4d8 replace pep8 check with generic linters
Includes removal of file pattern from pep8 job which prevented
it from running on most changes. Linters will use multiple tools
and a pattern would make it fail to spot errors.

This check should run even if no files are changed, so it would
be able to check commit messages.

There are no real load implications because linters check is
just a simple tox execution which has minimal resource requirements.

Includes reactivaction or linting which was not running on
the entire repository. This required few minor fixes.

Partial-Bug: #1786286
Change-Id: I4d4279309af55c2663e98bd0cdec9224f03c1fa0
2018-08-29 19:03:09 +01:00
Ronelle Landy dbca28c411 Add linter jobs for releases file script
This review adds a pep8 jobs to be triggered
with changes to the releases script files.
pylint was considered but removed from this
initial review.

Change-Id: Ib8809c94d99ccb1ecafa94b3791f613c35dbd9ef
2018-05-18 10:37:44 -04:00
Ronelle Landy 7ca3fcd685 Add releases script pytest tests to tox.ini
Add tox testing in upstream jobs with changes to
the releases script.

Removed pyflakes as these test are not running as
required.

Change-Id: I3fdf0be7beb814a681a2dcc155bae87fdb6a4c7e
2018-05-18 10:33:47 -04:00
Paul Belanger aa2b3264e7
Add bindep.txt file
Bindep is a tool for checking the presence of binary packages needed
to use an application / library. It started life as a way to make it
easier to set up a development environment for OpenStack projects.

Change-Id: Idde756a7e6abef2d4e40f02af5a446278b5efcd6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-23 13:56:24 -04:00
Paul Belanger 64e9cfa240
Allow user to run tox -ecireport
Here we are fixing 2 bugs:
 - Add missing SSH port for review.o.o
 - Allow tox to read SSH_AUTH_SOCK, so we don't prompt for SSH private
   key more then once.

Change-Id: Ia3f1205b5169df7af67926810bd298cd25716b26
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-06-06 14:11:34 -04:00
Dan Prince 4f169bd5ad Switch website to use tripleo-jobs-gerrit.py
This updates the generate_site.sh script to use the
Gerrit version of the script instead.

Change-Id: If67d46953412cafee16b9660483fa494fc85777c
2016-04-20 21:29:51 -04:00
Dan Prince a4f7707364 Add setup/tox/requirements files
This patch adds files so that tripleo-ci can run
pep8 tests, and also be capable of running the
CI status report in a tox environment.

Pep8 tests are currently failing... those will be fixed
in a follow up patch.

Change-Id: Ifdfb0a8f3db0d53097b871408203448266145d50
2015-09-28 10:18:38 -04:00