Use upper-constraints file from requirements project
Change-Id: I26318898ced32248a2ff31a78ec15d49382b9027
This commit is contained in:
parent
905b60633c
commit
388426812d
@ -22,7 +22,10 @@ libselinux-python [platform:rhel-7]
|
|||||||
libselinux-python [platform:centos-7]
|
libselinux-python [platform:centos-7]
|
||||||
python-devel [platform:rhel-7]
|
python-devel [platform:rhel-7]
|
||||||
python-devel [platform:centos-7]
|
python-devel [platform:centos-7]
|
||||||
|
python-pip [platform:centos-7]
|
||||||
|
python-pip [platform:rhel-7]
|
||||||
python-virtualenv [platform:centos-7]
|
python-virtualenv [platform:centos-7]
|
||||||
|
python-virtualenv [platform:rhel-7]
|
||||||
|
|
||||||
# RHEL/CentOS 8
|
# RHEL/CentOS 8
|
||||||
python3-libselinux [platform:rhel-8]
|
python3-libselinux [platform:rhel-8]
|
||||||
|
@ -163,6 +163,10 @@ subparsers:
|
|||||||
type: Value
|
type: Value
|
||||||
help: test cases log file
|
help: test cases log file
|
||||||
ansible_variable: test_log_file
|
ansible_variable: test_log_file
|
||||||
|
upper-constraints-file:
|
||||||
|
type: Value
|
||||||
|
help: URL or path to upper contraints file
|
||||||
|
ansible_variable: upper_constraints_file
|
||||||
|
|
||||||
- title: Collect stage
|
- title: Collect stage
|
||||||
options:
|
options:
|
||||||
|
6
roles/tests/Vagrantfile
vendored
6
roles/tests/Vagrantfile
vendored
@ -18,6 +18,9 @@ TOX_INI_DIR = '../..'
|
|||||||
|
|
||||||
TEST_DIR = File.dirname(__FILE__)
|
TEST_DIR = File.dirname(__FILE__)
|
||||||
|
|
||||||
|
UPPER_CONSTRAINTS_FILE = ENV.fetch(
|
||||||
|
"UPPER_CONSTRAINTS_FILE",
|
||||||
|
"https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt")
|
||||||
|
|
||||||
# list of VMs
|
# list of VMs
|
||||||
NODES = {
|
NODES = {
|
||||||
@ -120,6 +123,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
node.vm.provision "ansible" do |ansible|
|
node.vm.provision "ansible" do |ansible|
|
||||||
ansible.limit = 'all'
|
ansible.limit = 'all'
|
||||||
ansible.playbook = playbook_file
|
ansible.playbook = playbook_file
|
||||||
|
ansible.extra_vars = {
|
||||||
|
'upper_constraints_file' => UPPER_CONSTRAINTS_FILE,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -16,12 +16,14 @@
|
|||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: "run Tox InfraRed plugin"
|
- name: "run Tox InfraRed plugin"
|
||||||
command: >
|
command:
|
||||||
'{{ tox_executable }}' -e infrared --
|
cmd: >
|
||||||
--host secondary
|
'{{ tox_executable }}' -e infrared --
|
||||||
--collect-dir '{{ test_collect_dir }}'
|
--host secondary
|
||||||
args:
|
--collect-dir '{{ test_collect_dir }}'
|
||||||
chdir: /vagrant
|
chdir: /vagrant
|
||||||
|
environment:
|
||||||
|
UPPER_CONSTRAINTS_FILE: '{{ remote_constraints_file }}'
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
register: run_tox
|
register: run_tox
|
||||||
|
|
||||||
|
@ -63,3 +63,10 @@ test_log_file: '{{ test_report_dir | realpath }}/tobiko.log'
|
|||||||
|
|
||||||
# Local where test cases results are being collected to
|
# Local where test cases results are being collected to
|
||||||
test_collect_dir: '{{ test_src_dir | realpath }}/{{ test_report_name }}'
|
test_collect_dir: '{{ test_src_dir | realpath }}/{{ test_report_name }}'
|
||||||
|
|
||||||
|
|
||||||
|
# --- Workaround compatibility issues -----------------------------------------
|
||||||
|
|
||||||
|
upper_constraints_file:
|
||||||
|
'https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt'
|
||||||
|
|
||||||
|
35
roles/tobiko-ensure-python3/tasks/constraints.yaml
Normal file
35
roles/tobiko-ensure-python3/tasks/constraints.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- block:
|
||||||
|
|
||||||
|
- name: "look at remote host constraints file '{{ upper_constraints_file }}'"
|
||||||
|
stat:
|
||||||
|
path: '{{ upper_constraints_file | realpath }}'
|
||||||
|
when: "not upper_constraints_file.startswith('http')"
|
||||||
|
register: stat_upper_constraints_file
|
||||||
|
failed_when: 'not stat_upper_constraints_file.stat.exists'
|
||||||
|
|
||||||
|
- name: "set remote upper constraints file path"
|
||||||
|
set_fact:
|
||||||
|
remote_constraints_file: '{{ upper_constraints_file }}'
|
||||||
|
|
||||||
|
rescue:
|
||||||
|
- name: "create temporary upper requirements file"
|
||||||
|
tempfile:
|
||||||
|
state: file
|
||||||
|
suffix: .txt
|
||||||
|
register: create_upper_constraints_file
|
||||||
|
|
||||||
|
- debug: var=create_upper_constraints_file
|
||||||
|
|
||||||
|
- name: "copy upper requirements file"
|
||||||
|
copy:
|
||||||
|
src: '{{ upper_constraints_file }}'
|
||||||
|
dest: '{{ create_upper_constraints_file.path }}'
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: "set remote upper constraints file path"
|
||||||
|
set_fact:
|
||||||
|
remote_constraints_file: '{{ create_upper_constraints_file.path }}'
|
||||||
|
|
||||||
|
- debug: var=upper_constraints_file
|
@ -37,11 +37,12 @@
|
|||||||
- name: "upgrade '{{ python_command }}' packages to the latest versions"
|
- name: "upgrade '{{ python_command }}' packages to the latest versions"
|
||||||
command: >
|
command: >
|
||||||
'{{ python_info[python_command].executable }}' -m pip install '{{ item }}' \
|
'{{ python_info[python_command].executable }}' -m pip install '{{ item }}' \
|
||||||
--upgrade --user
|
--upgrade --user -c '{{ remote_constraints_file }}'
|
||||||
loop:
|
loop:
|
||||||
- pip
|
- pip
|
||||||
- setuptools
|
- setuptools
|
||||||
- wheel
|
- wheel
|
||||||
|
- virtualenv
|
||||||
|
|
||||||
|
|
||||||
- name: "show python_info facts"
|
- name: "show python_info facts"
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
- (python_version | string).split(".")[0] == '3'
|
- (python_version | string).split(".")[0] == '3'
|
||||||
|
|
||||||
|
|
||||||
|
- include_tasks: constraints.yaml
|
||||||
|
|
||||||
|
|
||||||
- include_tasks: install.yaml
|
- include_tasks: install.yaml
|
||||||
vars:
|
vars:
|
||||||
python_command: '{{ python3_command }}'
|
python_command: '{{ python3_command }}'
|
||||||
|
@ -18,4 +18,7 @@ tox_report_env:
|
|||||||
TOBIKO_TEST_REPORT_DIR: '{{ tox_report_dir }}'
|
TOBIKO_TEST_REPORT_DIR: '{{ tox_report_dir }}'
|
||||||
TOBIKO_TEST_REPORT_NAME: '{{ tox_report_name }}'
|
TOBIKO_TEST_REPORT_NAME: '{{ tox_report_name }}'
|
||||||
|
|
||||||
tox_constrain_env: {}
|
tox_constraints_file: '{{ remote_constraints_file }}'
|
||||||
|
|
||||||
|
tox_constrain_env:
|
||||||
|
UPPER_CONSTRAINTS_FILE: '{{ tox_constraints_file }}'
|
||||||
|
8
tox.ini
8
tox.ini
@ -9,7 +9,7 @@ minversion = 3.4.0
|
|||||||
[base]
|
[base]
|
||||||
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
-c{env:UPPER_CONSTRAINTS_FILE}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
passenv =
|
passenv =
|
||||||
PS1
|
PS1
|
||||||
@ -18,11 +18,12 @@ setenv =
|
|||||||
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||||
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
||||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||||
|
PS1=[tobiko@{envname}] {env:PS1:}
|
||||||
PYTHON={env:PYTHON:python3}
|
PYTHON={env:PYTHON:python3}
|
||||||
PYTHONWARNINGS=ignore::Warning,{env:PYTHONWARNINGS:}
|
PYTHONWARNINGS=ignore::Warning,{env:PYTHONWARNINGS:}
|
||||||
TOBIKO_PREVENT_CREATE={env:TOBIKO_PREVENT_CREATE:false}
|
TOBIKO_PREVENT_CREATE={env:TOBIKO_PREVENT_CREATE:false}
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
PS1=[tobiko@{envname}] {env:PS1:}
|
UPPER_CONSTRAINTS_FILE={env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
||||||
commands =
|
commands =
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
|
||||||
@ -188,7 +189,7 @@ whitelist_externals =
|
|||||||
rm
|
rm
|
||||||
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
-c{env:UPPER_CONSTRAINTS_FILE}
|
||||||
-rinfrared-requirements.txt
|
-rinfrared-requirements.txt
|
||||||
passenv =
|
passenv =
|
||||||
{[testenv:venv]passenv}
|
{[testenv:venv]passenv}
|
||||||
@ -213,6 +214,7 @@ commands =
|
|||||||
ir tobiko \
|
ir tobiko \
|
||||||
--tobiko-src-dir {toxinidir} \
|
--tobiko-src-dir {toxinidir} \
|
||||||
--collect-dir '{toxinidir}/test_results' \
|
--collect-dir '{toxinidir}/test_results' \
|
||||||
|
--upper-constraints '{env:UPPER_CONSTRAINTS_FILE}' \
|
||||||
{posargs}
|
{posargs}
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
- openstack/devstack-gate
|
- openstack/devstack-gate
|
||||||
- openstack/heat
|
- openstack/heat
|
||||||
- openstack/neutron
|
- openstack/neutron
|
||||||
|
- openstack/requirements
|
||||||
- x/tobiko
|
- x/tobiko
|
||||||
timeout: 7200
|
timeout: 7200
|
||||||
vars:
|
vars:
|
||||||
@ -68,6 +69,7 @@
|
|||||||
yaml: true
|
yaml: true
|
||||||
yml: true
|
yml: true
|
||||||
tobiko_dir: '/opt/stack/tobiko'
|
tobiko_dir: '/opt/stack/tobiko'
|
||||||
|
upper_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/openstack/requirements/upper-constraints.txt'
|
||||||
|
|
||||||
pre-run: playbooks/devstack/pre.yaml
|
pre-run: playbooks/devstack/pre.yaml
|
||||||
run: playbooks/devstack/run.yaml
|
run: playbooks/devstack/run.yaml
|
||||||
|
@ -10,18 +10,20 @@
|
|||||||
pre-run: playbooks/infrared/pre.yaml
|
pre-run: playbooks/infrared/pre.yaml
|
||||||
run: playbooks/infrared/run.yaml
|
run: playbooks/infrared/run.yaml
|
||||||
required-projects:
|
required-projects:
|
||||||
x/tobiko
|
- name: openstack/requirements
|
||||||
|
- name: x/tobiko
|
||||||
vars:
|
vars:
|
||||||
test_collect_dir: '{{ zuul_output_dir }}/logs'
|
test_collect_dir: '{{ zuul_output_dir }}/logs'
|
||||||
test_inventory_file: '{{ zuul_work_dir }}/ansible_hosts'
|
test_inventory_file: '{{ zuul_work_dir }}/ansible_hosts'
|
||||||
tox_envlist: infrared
|
tox_envlist: infrared
|
||||||
tox_extra_args: -- --host secondary --collect-dir {{ test_collect_dir | quote }}
|
tox_extra_args: -- --host secondary --collect-dir {{ test_collect_dir | quote }}
|
||||||
|
tox_constraints_file: '{{ upper_constraints_file }}'
|
||||||
|
upper_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/openstack/requirements/upper-constraints.txt'
|
||||||
tox_environ:
|
tox_environ:
|
||||||
ANSIBLE_INVENTORY: '{{ test_inventory_file }}'
|
ANSIBLE_INVENTORY: '{{ test_inventory_file }}'
|
||||||
zuul_output_dir: '{{ ansible_user_dir }}/zuul-output'
|
zuul_output_dir: '{{ ansible_user_dir }}/zuul-output'
|
||||||
zuul_work_dir: "{{ zuul.projects['opendev.org/x/tobiko'].src_dir }}"
|
zuul_work_dir: "{{ zuul.projects['opendev.org/x/tobiko'].src_dir }}"
|
||||||
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: tobiko-tox-infrared-centos-7
|
name: tobiko-tox-infrared-centos-7
|
||||||
parent: tobiko-tox-infrared
|
parent: tobiko-tox-infrared
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
description: Base Tobiko TripleO job
|
description: Base Tobiko TripleO job
|
||||||
parent: tripleo-ci-centos-8-scenario002-standalone
|
parent: tripleo-ci-centos-8-scenario002-standalone
|
||||||
required-projects:
|
required-projects:
|
||||||
|
- openstack/requirements
|
||||||
- openstack/tripleo-ci
|
- openstack/tripleo-ci
|
||||||
- x/tobiko
|
- x/tobiko
|
||||||
|
|
||||||
pre-run: playbooks/tripleo/pre.yaml
|
pre-run: playbooks/tripleo/pre.yaml
|
||||||
run: playbooks/tripleo/run.yaml
|
run: playbooks/tripleo/run.yaml
|
||||||
post-run: playbooks/tripleo/post.yaml
|
post-run: playbooks/tripleo/post.yaml
|
||||||
@ -14,6 +14,7 @@
|
|||||||
test_conf:
|
test_conf:
|
||||||
keystone:
|
keystone:
|
||||||
cloud_name: standalone
|
cloud_name: standalone
|
||||||
|
upper_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/openstack/requirements/upper-constraints.txt'
|
||||||
featureset: '052'
|
featureset: '052'
|
||||||
featureset_override:
|
featureset_override:
|
||||||
run_tempest: false
|
run_tempest: false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user