Switch build-openstack-sphinx-docs to build-sphinx-docs
As per the recent PTI update, docs should be built without tox and instead using direct sphinx-build commands. The general job build-sphinx-docs does this, so use it. Keep the build-openstack-sphinx-docs job because we need to set constraints support. This includes a hack to allow neutron and horizon plugin repos to work properly with their tox_install.sh list of additional requirements. Change-Id: Ib121961c5a953a434e7b333cd70f7838a2671f69 Depends-On: Ie65dcb42c48e6a962f6715f7483ef3758caf2965
This commit is contained in:
parent
2b00e611b2
commit
e1a793b8a1
4
playbooks/sphinx-docs/neutron-horizon-hack.yaml
Normal file
4
playbooks/sphinx-docs/neutron-horizon-hack.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
# TODO(mordred) ZOMG DELETE THIS
|
||||
- hosts: all
|
||||
roles:
|
||||
- neutron-horizon-hack
|
@ -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
|
26
roles/neutron-horizon-hack/README.rst
Normal file
26
roles/neutron-horizon-hack/README.rst
Normal 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.
|
2
roles/neutron-horizon-hack/defaults/main.yaml
Normal file
2
roles/neutron-horizon-hack/defaults/main.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
zuul_work_virtualenv: "{{ ansible_user_dir }}/.venv"
|
27
roles/neutron-horizon-hack/tasks/main.yaml
Normal file
27
roles/neutron-horizon-hack/tasks/main.yaml
Normal 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 }}"
|
@ -185,7 +185,7 @@
|
||||
|
||||
- job:
|
||||
name: build-openstack-sphinx-docs
|
||||
parent: tox-docs
|
||||
parent: build-sphinx-docs
|
||||
branches: ^(?!driverfixes/).*$
|
||||
description: |
|
||||
Builds documentation using Sphinx per the OpenStack PTI and then
|
||||
@ -194,16 +194,14 @@
|
||||
It runs the prepare-docs-for-afs role so that AFS stamp files
|
||||
can be examined if desired, and also validates htaccess files
|
||||
using the whereto tool.
|
||||
run: playbooks/sphinx-docs/run.yaml
|
||||
success-url: html/
|
||||
required-projects:
|
||||
- name: openstack/requirements
|
||||
pre-run: playbooks/sphinx-docs/neutron-horizon-hack.yaml
|
||||
roles:
|
||||
- zuul: openstack-infra/zuul-jobs
|
||||
vars:
|
||||
tox_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
|
||||
constraints_file: '{{ ansible_user_dir }}/src/git.openstack.org/openstack/requirements/upper-constraints.txt'
|
||||
|
||||
- job:
|
||||
name: tox-py35-on-zuul
|
||||
|
Loading…
Reference in New Issue
Block a user