From 002956ee5418f56cce3be31523b112f8431880af Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 22 Aug 2018 07:19:19 +0200 Subject: [PATCH] Update tox-docs to follow build-sphinx better The build-sphinx job uses compile and test bindep profiles, update tox-docs to use the same. tox-docs used to run tools/test_setup due to inheriting from unittests, remove that inheritance since we do not need it. Update role bindep to have a default for zuul_work_dir. If this role is used without unittests, zuul_work_dir is unset. Change-Id: I5df8b9cd90bf5e4f4c84c7b4514fb9c575898e31 --- playbooks/tox-docs/pre.yaml | 5 +++++ roles/bindep/defaults/main.yaml | 2 ++ zuul.yaml | 12 ++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 playbooks/tox-docs/pre.yaml diff --git a/playbooks/tox-docs/pre.yaml b/playbooks/tox-docs/pre.yaml new file mode 100644 index 000000000..81975f024 --- /dev/null +++ b/playbooks/tox-docs/pre.yaml @@ -0,0 +1,5 @@ +- hosts: all + roles: + - role: bindep + bindep_dir: "{{ zuul_work_dir }}" + diff --git a/roles/bindep/defaults/main.yaml b/roles/bindep/defaults/main.yaml index f17cb0497..6f476a33c 100644 --- a/roles/bindep/defaults/main.yaml +++ b/roles/bindep/defaults/main.yaml @@ -1,3 +1,5 @@ --- bindep_dir: "{{ zuul.project.src_dir }}" bindep_profile: compile test + +zuul_work_dir: "{{ zuul.project.src_dir }}" diff --git a/zuul.yaml b/zuul.yaml index 6facb634d..61cfaf467 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -97,14 +97,22 @@ - job: name: tox-docs - parent: tox + # This is not parented to tox since we do not need + # the roles from its parent unittests. description: | Run documentation unit tests. Uses tox with the ``docs`` environment. vars: tox_envlist: docs - post-run: playbooks/tox/docs-post.yaml + bindep_profile: compile doc + run: playbooks/tox/run.yaml + pre-run: + - playbooks/tox-docs/pre.yaml + - playbooks/tox/pre.yaml + post-run: + - playbooks/tox/docs-post.yaml + - playbooks/tox/post.yaml success-url: html/ - job: