Allow to retrieve releasenotes requirements from a dedicated place

These changes allow to store reno reqs in a dedicated place.

Indeed some projects just want to build release notes without other
documentation.

The releasenotes playbook will use the ensure-sphinx role so I think it
make sense to allow this specific use case (no doc dir available).

Change-Id: I1d244bb47fb6b0b35df130f34007ff51047cd2f1
This commit is contained in:
Hervé Beraud 2021-01-05 10:18:51 +01:00
parent ade85d3233
commit 6fed1caf0c
2 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,8 @@
Ensure sphinx is installed Ensure sphinx is installed
Installs sphinx. Also installs any dependencies needed in the first of Installs sphinx. Also installs any dependencies needed in the first of
doc/requirements.txt and test-requirements.txt to be found. doc/requirements.txt, releasenotes/requirements.txt and
test-requirements.txt to be found.
All pip installs are done with a provided constraints file, if given. All pip installs are done with a provided constraints file, if given.

View File

@ -26,14 +26,14 @@
name: find-constraints name: find-constraints
# We're not using with_first_found because the files are remote, not local. # We're not using with_first_found because the files are remote, not local.
# We want to use doc/requirements.txt if it exists or fallback to # We want to use doc/requirements.txt or releasenotes/requirements.txt
# test-requirements.txt. # if it exists else we want to fallback to test-requirements.txt.
- name: Get requirements files - name: Get requirements files
shell: shell:
executable: /bin/bash executable: /bin/bash
chdir: "{{ zuul_work_dir }}" chdir: "{{ zuul_work_dir }}"
cmd: | cmd: |
for f in doc/requirements.txt test-requirements.txt ; do for f in doc/requirements.txt releasenotes/requirements.txt test-requirements.txt ; do
if [ -f $f ] ; then if [ -f $f ] ; then
echo $f echo $f
break break