All our platforms are Python 3 now, so we can simplify this. We can
remove the virtualenv dependency as ensure-pip installs venv and sets
variables for us to use it when making a virtualenv.
Change-Id: I98c3da5b02a4ac7fb9d7bd8e00170762e77b9f40
The role will now use a known functional set of packages based on the
version of python being defined.
To allow users to add packages to a known functional version of
sphinx the variable `doc_building_extra_packages` has been added.
This option will union with `doc_building_packages`, installing all
python packages in a single set.
The releasenotes pre playbook has been updated so that it no longer
overrides the default package set when calling the "ensure-sphinx"
role. The playbook will now use the `doc_building_extra_packages`
option and include only the additional packages it needs. This change
allows folks to rely on the role to setup sphinx correctly without
needing to overriding everything.
Change-Id: Ib3d2fda164b173c82f17fabc20814753bfeaec6e
Signed-off-by: Kevin Carter <kecarter@redhat.com>
The first version of this change was broken, fix it with updating
roles/ensure-sphinx/tasks/main.yaml to run the test-requirements check
really on the remove node.
This reverts commit 68ded2251f34d2938eb7d91e846dd0e8ad6c892f.
Change-Id: I481e032834fdbf674157b2c9a8fa6f95fc570ddb
Some projects, such as Zuul itself, need to use python3 to build docs.
This adds a new parameter, sphinx_python, which defines the version
of python to build documentation with. The default is python2 and
projects can choose python3 on a need basis.
Remove the comment about the need for a leading comment, since there
is now a real need for the leading comment anyway.
Replace a few direct references to {{ ansible_user_dir }}/.venv that
should have been using zuul_work_virtualenv.
Update sphinx invocation to source the virtualenv activate first.
Some sphinx modules, such as sphinxcontrib.programoutput, attempt to
execute programs and only invoking sphinx-build with the relative
path causes the paths to not be set up properly.
Co-Authored-By: David Moreau Simard <dmsimard@redhat.com>
Change-Id: Ie5e2c93f88465f4aa746827ff88a585dbaa44fd5
Sphinx jobs and reno jobs need basically the same thing for
dependencies. So make a new role, ensure-sphinx, which is
parameterizable enough that it can be used by both reno and sphinx jobs.
Make build jobs for both releasenotes and sphinx docs, as both of these
things are perfectly valid things to do in both OpenStack and
non-OpenStack contexts. We'll add an openstack specific job in
openstack-zuul-jobs that uses these as parents but adds the requirements
repo and constraints file settings.
Some of the pip commands here can be improved once
https://github.com/ansible/ansible/pull/33098 lands and is released,
which would allow specifying --user and -c as parameters to the pip
module.
Change-Id: Idd7caf7d88b56d61872906027b4ce7d743572ded
Needed-By: I57de14580f39b9e1c11a587b51b44b61b02c84da