Ensure ChangeLog exists in install-if-python

We install projects if they are python in the sphinx jobs because
autodoc needs to be able to import the package. Also, for pbr projects,
many projects have links to ChangeLog in the docs, which is generated by
pbr on install and sdist. Installing with pip install --no-deps does not
cause the ChangeLog to be generated, so trigger it via an sdist build
first.

Change-Id: I4528cc7f322d1fc753eb5bc259f70c47ee9d1d80
This commit is contained in:
Monty Taylor 2017-12-01 13:36:05 -06:00
parent a4e9e12241
commit 28bf5c0dcc
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 15 additions and 0 deletions

View File

@ -41,6 +41,21 @@
- error_on_failure
- requirements_install|failed
# Build an sdist. This is needed for pbr projects that may expect
# the ChangeLog to have been generated.
- name: Make sdist to generate ChangeLog
command:
cmd: "{{ ansible_user_dir }}/.venv/bin/python setup.py sdist"
chdir: "{{ zuul_work_dir }}"
when:
- install_package
- found_python_files.matched
register: sdist_results
failed_when:
- error_on_failure is defined
- error_on_failure
- sdist_results|failed
# Try installing current repo in case it needs to be available for
# example for version number calculation. Ignore any failures here.
- name: Install the project if it is a Python project