From 02b5549ac3d85910f809623a59e0a3879b43905e Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 27 Mar 2020 14:04:06 +0200 Subject: [PATCH] Use contraints for tempest plugins This patch unifies the master branch with the changes which have been necessary to unbreak the stable branches in light of py2 support being removed from tempest and its plugins. Change-Id: I1d447933af5b668c17576a0ed985683a28fa153a (cherry picked from commit 9de0b7a59f150f5ef7bc9f85870edbafeedcbf10) --- defaults/main.yml | 2 ++ tasks/tempest_install.yml | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 15402573..5b159fa5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -21,6 +21,8 @@ debug: False tempest_package_state: "latest" tempest_pip_package_state: "latest" +tempest_upper_constraints_url: "https://opendev.org/openstack/requirements/raw/{{ requirements_git_install_branch | default('master') }}/upper-constraints.txt" + # Set the host which will execute the shade modules # for the service setup. The host must already have # clouds.yaml properly configured. diff --git a/tasks/tempest_install.yml b/tasks/tempest_install.yml index 9524e0b4..6b6a9a03 100644 --- a/tasks/tempest_install.yml +++ b/tasks/tempest_install.yml @@ -83,7 +83,7 @@ virtualenv_site_packages: "no" extra_args: >- {{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} - {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} + --constraint {{ tempest_upper_constraints_url }} {{ pip_install_options | default('') }} register: install_packages until: install_packages is success @@ -147,7 +147,7 @@ virtualenv_site_packages: "no" extra_args: >- {{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} - {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} + --constraint {{ tempest_upper_constraints_url }} {{ pip_install_options | default('') }} --isolated with_items: "{{ _test_requirements_stat.results }}" @@ -168,7 +168,7 @@ virtualenv_site_packages: "no" extra_args: >- {{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} - {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} + --constraint {{ tempest_upper_constraints_url }} {{ pip_install_options | default('') }} --isolated with_items: "{{ tempest_plugins }}" @@ -186,7 +186,7 @@ virtualenv_site_packages: "no" extra_args: >- {{ tempest_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} - {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} + --constraint {{ tempest_upper_constraints_url }} {{ pip_install_options | default('') }} --isolated with_items: "{{ tempest_plugins }}"