Pin virtualbmc to <2 when using Python 2

This is necessary until we drop support for CentOS 7.

Also use Train upper constraints with Python 2, since Train is the last
release to support Python 2.

Change-Id: I085d107ae2d338a7609dececb7b62555937b7b1e
This commit is contained in:
Mark Goddard 2020-03-11 10:50:24 +00:00
parent 13de0edd6c
commit 3db82fd551
5 changed files with 10 additions and 18 deletions

View File

@ -6,4 +6,4 @@ virtualenv_path: "{{ '/'.join([ansible_env['HOME'], 'tenks-venv']) }}"
# The URL of the upper constraints file to pass to pip when installing Python
# packages.
python_upper_constraints_url: >-
https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt
https://releases.openstack.org/constraints/upper/{% if ansible_python.version.major == 2 %}train{% else %}master{% endif %}

View File

@ -1,4 +0,0 @@
# This file contains the Python packages that are needed in the Tenks virtual
# env.
virtualbmc>=1.4.0 # Apache

View File

@ -18,19 +18,10 @@
retries: 3
become: true
# This is useful to get a uniquely generated temporary path.
- name: Create temporary file for pip requirements
tempfile:
register: req_file
- name: Copy requirements file to temporary location
copy:
src: requirements.txt
dest: "{{ req_file.path }}"
- name: Ensure Python requirements are installed
pip:
requirements: "{{ req_file.path }}"
name:
- "virtualbmc>=1.4.0{% if ansible_python.version.major == 2 %},<2{% endif %}"
extra_args: >-
-c {{ vbmcd_python_upper_constraints_url }}
virtualenv: "{{ vbmcd_virtualenv_path or omit }}"

View File

@ -11,6 +11,9 @@
name: tenks-deploy-teardown-centos
parent: tenks-deploy-teardown-base
nodeset: centos-7
required-projects:
- name: openstack/requirements
override-checkout: stable/train
- job:
name: tenks-deploy-teardown-ubuntu

View File

@ -13,7 +13,8 @@
- tenks-deploy-teardown-ubuntu
# Until we have ironic jobs using tenks, gate on the kayobe overcloud
# deploy job, which uses tenks to test bare metal compute provisioning.
- kayobe-overcloud-centos
# FIXME(mgoddard): Kayobe CentOS 7 jobs no longer working. Replace with C8.
# - kayobe-overcloud-centos
gate:
queue: tenks
jobs:
@ -22,4 +23,5 @@
- tenks-deploy-teardown-ubuntu
# Until we have ironic jobs using tenks, gate on the kayobe overcloud
# deploy job, which uses tenks to test bare metal compute provisioning.
- kayobe-overcloud-centos
# FIXME(mgoddard): Kayobe CentOS 7 jobs no longer working. Replace with C8.
# - kayobe-overcloud-centos