Merge "Switch build-openstack-sphinx-docs to build-sphinx-docs"

This commit is contained in:
Zuul 2017-12-18 15:58:11 +00:00 committed by Gerrit Code Review
commit c955338c42
6 changed files with 62 additions and 22 deletions

View File

@ -0,0 +1,4 @@
# TODO(mordred) ZOMG DELETE THIS
- hosts: all
roles:
- neutron-horizon-hack

View File

@ -1,17 +0,0 @@
- 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

@ -0,0 +1,26 @@
Hack around some requirements being declared in tox_install.sh
.. note:: TODO(mordred) ZOMG DELETE THIS
neutron and horizon plugin repos currently require running the tox_install.sh
script where a list of additional dependencies are listed that are not in
their requirements files. Luckily, tox_install.sh is designed to be run
inside of a virtualenv, so we can just run it in the sphinx ~/.venv and
get them installed. This will let us work towards a solution that does not
involve a custom install script.
**Role Variables**
.. zuul:rolevar:: constraints_file
Optional path to a constraints file to use.
.. zuul:rolevar:: zuul_work_virtualenv
:default: ~/.venv
Virtualenv that sphinx is installed in.
.. zuul:rolevar:: zuul_work_dir
:default: {{ zuul.project.src_dir }}
Directory to operate in.

View File

@ -0,0 +1,2 @@
zuul_work_dir: "{{ zuul.project.src_dir }}"
zuul_work_virtualenv: "{{ ansible_user_dir }}/.venv"

View File

@ -0,0 +1,27 @@
- name: Check for tox_install.sh
stat:
path: "{{ zuul_work_dir }}/tools/tox_install.sh"
get_checksum: false
get_mime: false
get_md5: false
register: tox_install
- name: Require Constraints File
when: tox_install.stat.exists and constraints_file is not defined
fail:
msg: tox_install.sh projects require a constraints file to be set
- name: Ensure log directory exists for backwards compat
when: tox_install.stat.exists
file:
path: '{{ zuul_work_virtualenv }}/log'
state: directory
- name: Install extra things needed by tox_install.sh
when: tox_install.stat.exists
shell:
executable: /bin/bash
cmd: |
source {{ zuul_work_virtualenv }}/bin/activate
tools/tox_install.sh {{ constraints_file }}
chdir: "{{ zuul_work_dir }}"

View File

@ -189,7 +189,7 @@
- job: - job:
name: build-openstack-sphinx-docs name: build-openstack-sphinx-docs
parent: tox-docs parent: build-sphinx-docs
branches: ^(?!driverfixes/).*$ branches: ^(?!driverfixes/).*$
description: | description: |
Builds documentation using Sphinx per the OpenStack PTI and then Builds documentation using Sphinx per the OpenStack PTI and then
@ -198,16 +198,14 @@
It runs the prepare-docs-for-afs role so that AFS stamp files It runs the prepare-docs-for-afs role so that AFS stamp files
can be examined if desired, and also validates htaccess files can be examined if desired, and also validates htaccess files
using the whereto tool. using the whereto tool.
run: playbooks/sphinx-docs/run.yaml
success-url: html/ success-url: html/
required-projects: required-projects:
- name: openstack/requirements - name: openstack/requirements
pre-run: playbooks/sphinx-docs/neutron-horizon-hack.yaml
roles: roles:
- zuul: openstack-infra/zuul-jobs - zuul: openstack-infra/zuul-jobs
vars: vars:
tox_constraints_file: '{{ ansible_user_dir }}/src/git.openstack.org/openstack/requirements/upper-constraints.txt' constraints_file: '{{ ansible_user_dir }}/src/git.openstack.org/openstack/requirements/upper-constraints.txt'
tox_envlist: venv
tox_extra_args: -vv python setup.py build_sphinx
- job: - job:
name: tox-py35-on-zuul name: tox-py35-on-zuul