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
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
- 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
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
- 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
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
- reverted previours workarounds
- assures we run ansible-lint on our files
- bumped linters
- fixed new problems found by the linters
Change-Id: I7812fcfd17569b0c438f58bec73ab0f4b07e625c
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/
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
Improve readability of pytest executions by producing html reports
which are also advertised by zuul, saving user time.
Change-Id: I306ad28c855c59f3d575da7a6132782ce02966d7
* 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
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
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
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
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
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
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
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
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
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
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
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>
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>
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