- moved vars file under vars to avoid failure to load file (newer
version raise error if you try to put vars outside vars/defaults as
it will assume they are broken playbooks.
- added missing file-modes on few tasks
Change-Id: I7217469d089b655ee16cd038391cffa4197c8c83
Part-Of: https://review.opendev.org/c/zuul/zuul-jobs/+/773245
This error occurs when variables are null and
DEFAULT_JINJA2_NATIVE is enabled:
object of type 'NoneType' has no len()
Change-Id: I7c69be60b846c03e30a0a6e8893bf2f3a3d5e5b8
We currently run ensure-python after running ensure-tox which means that
both ensure-pip and ensure-tox ran against the system Python instead of
the version that's created by ensure-python.
Depends-On: https://review.opendev.org/726549
Change-Id: Id2100bb5f981944223063cf4b2a5a568cc1dc366
/vars directories from 'tox' playbook and roles are merged, which
creates conflicts and wrong variables are loaded into the playbook
Prevent merge of /vars directories from roles and 'tox' playbook
by renaming variables directory of playbook to molecule-vars.
It should fix failing job tripleo-ansible-centos-7-role-addition
Change-Id: Iee6768a27db36a3a18c0728040ab9c09857d55b6
This change updates the tox molecule playbook to make it platform
agnostic by moving the OS specific package lists into var files
that will be dynamically loaded based on the operating system
the playbook is being executed against. This is being done so
that we can use molecule on OS's like CentOS, Ubuntu, SUSE,
Debian, etc. While the only platforms supported at this time
are Red Hat based, this change will allow additional var files
to be added enabling additional platforms without needing any
chanages to our task structure.
> The linters job has been updated to exclude vars files from the
ansible lint playbook commands. This is done because the playbook
commands assume all found files are playbooks.
Change-Id: I88f3551838e3676374d0a795631c8769ba40fbf4
Signed-off-by: Kevin Carter <kecarter@redhat.com>
Avoids the need to add complex bindep.txt on each repository that
uses molecule by adding the boostraping of dependencies directly
in the job definition.
This was already tested on CentOS/Fedora/RHEL via
https://review.rdoproject.org/r/#/c/21486/
Change-Id: I2a3b1143b566b31fb866f7c3ecae7ff0276cb246
This adds job definition for running Ansible Molecule testing framework
from inside tox.
This would ease use of molecule testing for any projects that
want to use by avoiding the need to duplicate the setup code across
each repository.
It uses tox `molecule` environment.
Change-Id: I8df4df5448a78b9e21f45fac12d534eb84b29d3d
Needed-By: https://review.opendev.org/#/c/663599/
Needed-By: https://review.opendev.org/#/c/651772/
Needed-By: https://review.opendev.org/#/c/663336/
ensure-python allows for installation of a specific version of
the python interpreter and development files. Add this role to
tox pre.yaml.
Change-Id: Ia56cba58c87aa48de3e8e3f3d28f6252f7dcd7c3
Sometimes projects are multi-language. Specifically, sometimes they need
to run both javascript and python toolchains. Support this by making a
tox-nodejs-npm job which installs both toolchains, then runs the npm
command followed by the tox command.
Most people won't need/want this, but it should make at least some folks
happy.
Change-Id: Iaedd680a548c6e8159693b7a79cd8676e805aa1f
Having revoke-sudo in the pre playbook of unittest has made us not able
to re-use unittest for javascript, and also means we can't use
nodejs-npm for nodejs-npm-run-test, which is a bit odd.
Instead, add the role to the run playbook for tox and npm, which allows
us to stack and combine things a bit better.
Change-Id: I0c7c508996ad2647db706d4ebf156c5dd96bf9b5
There is a bunch of duplicate logic between tox and tox-siblings, the
tox-siblings logic is already protected with a flag - and having them be
split already led to not doing the right thing with constraints files in
siblings when we did it right in tox itself.
Combine them into one role.
This means the siblings code will run as part of run instead of as part
of pre- but that's how things have worked for years anyway until
siblings was introduced - and is also the behavior is the siblings flag
is false -so it's more consistent overall.
Leave a no-op tox-siblings role so that we can gracefully remove the use of
tox-siblings from castellan, python-openstacksdk, shade and tacker.
Change-Id: Id61ae52d48b28cfc2221cb556a1c1f7c6dfd60dd
Add a post-run playbook to tox-cover job to collect the coverage
report detail and copy it to the log root of the executor.
Change-Id: Ibad091f7630832eb993133b0f43a60931b3dfd75
It's a common desire to be able to have a job that runs unittests
against the git checkout of another repository, but getting the tox
environment into that shape is a bunch of extra work.
Now that we have a defined place where repos go and they're always on
the build node, we can look in the source dir for git repos that contain
python packages and ask setup.py for the name of the python package they
provide.
We can then see what packages tox decided to install for this
environment, see if we have any matching ones in the source code repos
we've put on disk and if so we can re-install those depends from the
source location.
That way we can cause a tox job to use a second repo for cross-repo
unittesting simply by adding that project to required_projects.
Add a flag to disable the behavior ... although the easiest way to
disable the behavior is to just not list other projects in
required_projects.
Change-Id: Ia5250c11b1d73baaa70ea1cef7ea1ba4d5bab821
Story: 2001136
Task: 4852
The actions of the playbook don't really have anything to do with tox.
Tarballs go into dist/ whether tox is used or not.
Change-Id: I49d9efaf34644c47df0a1acb6ca108fe4ec99fa4
We can move the content from tox/post.yaml into an ansible role. This
allows other projects to use it.
Change-Id: Ic7fc31a372de29a3a97ef84539faf3b0a1d6e181
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Add some additional information about tarballs / wheels we are
copying. For example, md5 and sha1 info.
Change-Id: I96d6903f8bc5ced196b1b57f93277fa87bdf31c1
Depends-On: I86ff459d283eaf348821c2f11c1f8575598f088d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
We no longer need to depend on our run-tarball / run-wheel roles. I
also plan to add back our sha1sum / md5sum files back in a follow
patch.
Change-Id: If4814a21192112d841fdb24cfdd1fd1a8bd427e6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
It is possible somebody may want to run tox jobs over multiple nodes.
Check to see if more then one node is in our inventory, if so then add
the inventory_hostname to the log path.
Change-Id: Icd0532cb415fdae42eae6d2269d5a0be5fcdf98a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Because we want to use tox role variables (tox_envlist) across
multiple plays. We need to setup the variable in zuul.yaml. However,
this now means we need to create tox-pep8 job now since we are using
the tox/run playbook.
Change-Id: I6c15c076a510375dfacc66a0e07bc3f1228adf06
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Did didn't have ansible-lint setup properly, as a results our roles
weren't actually linted properly.
Fix variable linting issues and ignore ANSIBLE0012.
Change-Id: I07aa940245e700c9f08df0f1920720f0ed9d3de0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Rename tox_environment to tox_envlist to better map with tox --help
documentation. This also allows the following patch to support shell
environmental variables.
Change-Id: I2fb4e1c167ef93ad2948f2d328beff5e39ac52b7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
There is no need to have this disabled (seems to be by default). We
already have ensured our SSH hostkeys have been setup properly.
Change-Id: I5f0ffea13b4adb053c10d56728bcf02c13255513
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
The original idea was that we'd have a "python27" job. But it turns out
that "python27" isn't actually as universal as you might think.
"tox-py27" on the other hand is a thing that can and should always work
for people who want to run tox with the py27 env.
Port in the jobs we had in openstack-zuul-jobs.
Also, copy in the text of the old shell scripts so that we can iterate on
them and make them better piecemeal.
These are named zuul-tox not tox because we already have tox jobs
defined elsewhere. We'll need to do the naming dance while we work on
them.
Change-Id: I813f3f2ae138c07918556bc81655518023527131