From e6cc1afe2ef937567a4f5a210bcc4525a7d4eb49 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 8 Sep 2017 10:45:08 -0500 Subject: [PATCH] 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 --- playbooks/openstack-doc-build/run.yaml | 17 +++++++++++++++++ zuul.yaml | 1 + 2 files changed, 18 insertions(+) create mode 100644 playbooks/openstack-doc-build/run.yaml diff --git a/playbooks/openstack-doc-build/run.yaml b/playbooks/openstack-doc-build/run.yaml new file mode 100644 index 00000000..1527c3b8 --- /dev/null +++ b/playbooks/openstack-doc-build/run.yaml @@ -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 diff --git a/zuul.yaml b/zuul.yaml index ed0ffb9c..820e6198 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -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