
Similar to ensure-tox, split installing reno in to its own role. Change-Id: I8ac7c40f1fe8b590c4184437bf50a7c03cf2b45f
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
- name: Install gettext package
|
|
package:
|
|
name: gettext
|
|
state: present
|
|
become: yes
|
|
|
|
- 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: Record file location
|
|
set_fact:
|
|
upper_constraints: "-c {{ constraints_file }}"
|
|
when: not stat_results|skipped and stat_results.stat.exists
|
|
|
|
- name: Setup venv
|
|
shell:
|
|
chdir: '{{ zuul_work_dir }}'
|
|
executable: /bin/bash
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
|
|
UPPER_CONSTRAINTS="{{ upper_constraints }}"
|
|
python -m virtualenv .venv
|
|
VENV=.venv/bin
|
|
$VENV/pip install sphinx $UPPER_CONSTRAINTS
|
|
$VENV/pip install openstackdocstheme $UPPER_CONSTRAINTS
|
|
$VENV/pip install reno $UPPER_CONSTRAINTS
|
|
# Optionally, install local requirements
|
|
if [ -e releasenotes/requirements.txt ] ; then
|
|
$VENV/pip install -r releasenotes/requirements.txt $UPPER_CONSTRAINTS
|
|
fi
|
|
# TODO(jaegerandi): Remove once all repos are fixed.
|
|
# Try installing current repo in case it needs to be available for
|
|
# example for version number calculation. Ignore any failures here.
|
|
$VENV/pip install . || true
|