Add whereto test as optional step in doc build

If a project has whereto installed in its venv tox environment, use it
to run tests for the redirects in the .htaccess file that is part of
its documentation.

This is a port of https://review.openstack.org/#/c/502089 for zuulv3.

Change-Id: I9cfcc5f81487708e58022b83e24974fef653779f
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Monty Taylor 2017-09-08 10:45:08 -05:00
parent 5fbcc7e0e2
commit e6cc1afe2e
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
- hosts: all
roles:
- tox
post_tasks:
- name: check for whereto
stat:
path: "{{ zuul_work_dir }}/.tox/{{ tox_envlist }}/bin/whereto"
register: whereto
- name: Run tox again for whereto
include_role:
name: tox
vars:
tox_extra_args: whereto doc/source/_extra/.htaccess doc/test/redirect-tests.txt
when: whereto.stat.exists

View File

@ -58,6 +58,7 @@
- job:
name: openstack-doc-build
parent: tox-docs
run: playbooks/openstack-doc-build/run
post-run: playbooks/openstack-doc-build/post
required-projects:
- name: openstack/requirements