Unblocking the openstack-tox-docs job.

Fixing indentation error breaking openstack-tox-docs

Adjusts openstack-tox-docs job to be triggered by
the validations_common directory changes.

Introducing upper-requirements constraint to the
doc build dependencies.

Adjusts ansible_autodoc to handle missing molecule confs.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I8021f786476b61bbf88bf21a1151ce3198f7abbd
This commit is contained in:
Jiri Podivin 2021-05-18 16:13:15 +02:00
parent ae6c7e506d
commit 1d2149e934
4 changed files with 29 additions and 26 deletions

View File

@ -69,6 +69,7 @@
files: files:
- ^doc/.* - ^doc/.*
- ^README.rst - ^README.rst
- ^validations_common/.*
gate: gate:
jobs: jobs:
- openstack-tox-linters - openstack-tox-linters

View File

@ -265,36 +265,36 @@ class AnsibleAutoPluginDirective(Directive):
) )
with open(molecule_file) as f: with open(molecule_file) as f:
molecule_conf = DOCYAML.load(f.read()) molecule_conf = DOCYAML.load(f.read())
if molecule_conf:
driver_data = molecule_conf.get('driver') driver_data = molecule_conf.get('driver')
if driver_data: if driver_data:
molecule_section.append(
nodes.field_name(
text='Driver: {}'.format(
driver_data['name']
)
)
)
options = driver_data.get('options')
if options:
molecule_section.append( molecule_section.append(
self._yaml_section( nodes.field_name(
to_yaml_data=options, text='Driver: {}'.format(
section_title='Molecule Options' driver_data['name']
)
) )
) )
provisioner_data = molecule_conf.get('provisioner') options = driver_data.get('options')
if provisioner_data: if options:
inventory = provisioner_data.get('inventory') molecule_section.append(
if inventory: self._yaml_section(
molecule_section.append( to_yaml_data=options,
self._yaml_section( section_title='Molecule Options'
to_yaml_data=inventory, )
section_title='Molecule Inventory' )
provisioner_data = molecule_conf.get('provisioner')
if provisioner_data:
inventory = provisioner_data.get('inventory')
if inventory:
molecule_section.append(
self._yaml_section(
to_yaml_data=inventory,
section_title='Molecule Inventory'
)
) )
)
molecule_playbook_path = os.path.join( molecule_playbook_path = os.path.join(
molecule_path, molecule_path,

View File

@ -127,6 +127,7 @@ commands =
[testenv:docs] [testenv:docs]
deps = deps =
-c {env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r {toxinidir}/doc/requirements.txt -r {toxinidir}/doc/requirements.txt
-r {toxinidir}/molecule-requirements.txt -r {toxinidir}/molecule-requirements.txt
commands= commands=

View File

@ -44,7 +44,8 @@ def is_iso_time(time_string):
with the default delimiter. with the default delimiter.
Regex is somewhat convoluted, but general enough to last Regex is somewhat convoluted, but general enough to last
at least until the 9999 AD. at least until the 9999 AD.
Returns:
:returns:
True if string matches the pattern. True if string matches the pattern.
False otherwise. False otherwise.
""" """