Use ensure-pip for stackviz pip install

Infra is trying to move to nodes that do not come with pip/virtualenv
pre-installed on the image; for details see the spec at [1].

zuul-jobs include ensure-pip [2] to provide pip dependencies; use that
before installing stackviz.  Note that if pip is installed this is a
noop.

[1] https://docs.opendev.org/opendev/infra-specs/latest/specs/cleanup-test-node-python.html
[2] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#role-ensure-pip

Needed-By: https://review.opendev.org/723762
Change-Id: I24925ab8e885404da64a3ecfca3848041b6dfc05
This commit is contained in:
Ian Wienand 2020-04-29 08:57:13 +10:00
parent 66f1000004
commit 08a40ad129

View File

@ -17,13 +17,18 @@
when: not subunit_input.stat.exists
- name: Install stackviz
pip:
name: "file://{{ stackviz_archive.stat.path }}"
virtualenv: /tmp/stackviz
extra_args: -U
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
block:
- include_role:
name: ensure-pip
- pip:
name: "file://{{ stackviz_archive.stat.path }}"
virtualenv: /tmp/stackviz
virtualenv_command: '{{ ensure_pip_virtualenv_command }}'
extra_args: -U
- name: Deploy stackviz static html+js
command: cp -pR /tmp/stackviz/share/stackviz-html {{ stage_dir }}/stackviz