From 3f7a8c034768d4095ed57257b1069c4ef0989508 Mon Sep 17 00:00:00 2001 From: Grzegorz Grasza Date: Wed, 24 Jun 2020 12:15:18 +0200 Subject: [PATCH] Fix missing virtualenv in molecule tests centos-8: Setup test-python task fails with: Failed to find required executable virtualenv. This was dropped recently in the base image, so we need to handle this ourselves. We also need to make sure tox is available in test-python so that we can invoke molecule. Change-Id: I200d64103bee540076551fd026cc8f4c21b40411 --- zuul.d/playbooks/pre.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zuul.d/playbooks/pre.yml b/zuul.d/playbooks/pre.yml index d32d120..63e3d58 100644 --- a/zuul.d/playbooks/pre.yml +++ b/zuul.d/playbooks/pre.yml @@ -11,12 +11,22 @@ path: "{{ ansible_user_dir }}/zuul-output/logs" state: directory + - name: Ensure pip is available + include_role: + name: ensure-pip + - name: Setup test-python pip: requirements: "{{ tripleo_ipa_project_path }}/molecule-requirements.txt" virtualenv: "{{ ansible_user_dir }}/test-python" + virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_site_packages: true + - name: Make sure tox is installed in test-python virtualenv + pip: + name: tox + virtualenv: "{{ ansible_user_dir }}/test-python" + - name: Display test-python virtualenv package versions shell: |- . {{ ansible_user_dir }}/test-python/bin/activate