b493ca62dd
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
19 lines
603 B
YAML
19 lines
603 B
YAML
- name: Check to see if the constraints file exists
|
|
stat:
|
|
path: "{{ constraints_file|default('missing') }}"
|
|
get_checksum: false
|
|
get_mime: false
|
|
get_md5: false
|
|
register: stat_results
|
|
when: constraints_file is defined
|
|
|
|
- name: Require defined constraints file to be found
|
|
fail:
|
|
msg: constraints_file was defined but was not found on the system
|
|
when: constraints_file is defined and not stat_results.stat.exists
|
|
|
|
- name: Record file location
|
|
set_fact:
|
|
upper_constraints: "-c {{ constraints_file|realpath }}"
|
|
when: not stat_results|skipped and stat_results.stat.exists
|