From 08a40ad12977b041576b2e09c108c75c9a9b84cf Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 29 Apr 2020 08:57:13 +1000 Subject: [PATCH] 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 --- roles/process-stackviz/tasks/main.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/roles/process-stackviz/tasks/main.yaml b/roles/process-stackviz/tasks/main.yaml index 3724e0ec5e..e3a0a0e40d 100644 --- a/roles/process-stackviz/tasks/main.yaml +++ b/roles/process-stackviz/tasks/main.yaml @@ -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