From 1211185f3b044df964c701f940af12214a682c2f Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 10 Jun 2019 10:05:51 +0100 Subject: [PATCH] Adds tox-molecule job 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/ --- doc/source/python-jobs.rst | 1 + playbooks/tox/pre-molecule.yaml | 3 +++ zuul.yaml | 11 +++++++++++ 3 files changed, 15 insertions(+) create mode 100644 playbooks/tox/pre-molecule.yaml diff --git a/doc/source/python-jobs.rst b/doc/source/python-jobs.rst index 1269a0664..a80661ee5 100644 --- a/doc/source/python-jobs.rst +++ b/doc/source/python-jobs.rst @@ -9,6 +9,7 @@ Python Jobs .. zuul:autojob:: tox-py37 .. zuul:autojob:: tox-docs .. zuul:autojob:: tox-linters +.. zuul:autojob:: tox-molecule .. zuul:autojob:: tox-pep8 .. zuul:autojob:: tox-cover .. zuul:autojob:: tox-bashate diff --git a/playbooks/tox/pre-molecule.yaml b/playbooks/tox/pre-molecule.yaml new file mode 100644 index 000000000..52f5b5b26 --- /dev/null +++ b/playbooks/tox/pre-molecule.yaml @@ -0,0 +1,3 @@ +- hosts: all + roles: + - install-docker diff --git a/zuul.yaml b/zuul.yaml index 7c4a08984..d1fd44fca 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -212,6 +212,17 @@ vars: tox_envlist: linters +- job: + name: tox-molecule + parent: tox + pre-run: playbooks/tox/pre-molecule.yaml + description: | + Runs Ansible molecule testing on a system where docker is available. + + Uses tox with the ``molecule`` environment. + vars: + tox_envlist: molecule + - job: name: tox-pep8 parent: tox