Commit Graph

10 Commits

Author SHA1 Message Date
Albin Vass 9062289151 Check for loop_control in with_ type loops
Change-Id: I191265df7709a6262b44a428d78fe28ffaeb4b75
2020-05-01 13:45:34 +02:00
Andreas Jaeger 7ee3db4d1b Fix non-standard docs build
sphinx_warning_is_error and sphinx-pbr_autodoc are only useful for the
default documents living in doc/ - but not for api-ref, api-guide, etc.

Check for standard builds and do not run the "python setup.py
build_sphinx" or whereto for non-standard paths.

Change-Id: Ia8edd8a6ebc24f67a52d77c21b0cfa467e45a7ce
2017-12-26 13:29:12 +01:00
Monty Taylor 1e1c54e23b Handle projects still using pbr autodoc_index_modules
There are a non-zero number of projects in OpenStack that are still
using pbr.autodoc_index_modules. Switching to the new sphinx build job
breaks them if they have warning-is-error turned on, as their docs are
expecting a reference to the autogenerated module doc indexes.

We should come up with a better solution for migrating them ... probably
a sphinx plugin that one can use with some options and whatnot. Or we
can commit a copy of the generated autoindex file and then treat it as
actual source code moving forward.

For now we need to run those projects with the pbr modified sphinx
builder. This adds support to the setup.cfg value lookup module
for looking up autodoc_index_modules and plumbs it in to the sphinx
invocation.

A note has also been left with an idea for how to simplify this and
remove the python module (we can ini lookup on the executor) but
implementing that is left as an exercise for later.

Change-Id: Ie0c9f24df09255e871f904e079b68809144b36b4
2017-12-18 21:31:56 +01:00
Andreas Jaeger 88279bd6cc Revert "Revert "Add sphinx_python variable to sphinx role and job""
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 68ded2251f.

Change-Id: I481e032834fdbf674157b2c9a8fa6f95fc570ddb
2017-12-13 16:31:26 +01:00
Jens Harbott (frickler) 68ded2251f Revert "Add sphinx_python variable to sphinx role and job"
This reverts commit 1f8c473765.

Change-Id: I98e7414337d58af0f4819163ee0e88702a52c051
2017-12-08 11:10:45 +00:00
David Moreau Simard 1f8c473765
Add sphinx_python variable to sphinx role and job
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
2017-12-05 21:10:15 -05:00
Zuul 7ce3416a92 Merge "Only run whereto if htaccess file exists" 2017-11-22 18:39:10 +00:00
Monty Taylor d218cbbb84
Only run whereto if htaccess file exists
Update the sphinx job to not attempt whereto if there is no htacess file
in the first place.

Change-Id: Ie6835a48ee62bd8f0ac2e5cd6f3684c328ac6b02
2017-11-21 14:00:46 -06:00
Monty Taylor fc4bbd8f07
Add support for warning-is-error to sphinx role
Sphinx currently does not have a way to set warning-is-error in a config
file for builds that do not use python setup.py build_sphinx. It's
perfectly reasonable to use Sphinx for non-python languages, but putting
a setup.cfg into those projects is a bit weird. While we wait on getting
a config setting upstream, read the value out of setup.cfg ourselves if
it exists. This will let existing python projects with the setting work
as we expect, but will also let us just set a zuul variable for
non-python projects if we decide to not just put a setup.cfg in them.

Change-Id: Ie65dcb42c48e6a962f6715f7483ef3758caf2965
2017-11-20 18:00:26 -06:00
Monty Taylor b493ca62dd
Add general sphinx and reno jobs and role
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
2017-11-20 17:59:28 -06:00