Cleanup of infrared zuul jobs

tobiko-infrared-ubuntu is removed. It always fails because infrared is
not compatible with ubuntu-focal.

Former tobiko-infrared is removed. It did not really test anything
because there was no "primary" host in the inventory and essential
ansible plays from this job need to be run on the "primary" host.

Former tobiko-infrared-centos-9 is renamed to tobiko-infrared and it
will only use one node. The aim of this job is just to validate the the
tobiko infrared plugin works (it just executes tobiko unit and
functional tests).

Existing tobiko-check-collected-files ansible role has been removed. It
was only used to test that results where properly generated when the
tobiko infrared plugin was used, but it only work when no workflow was
specify.

Change-Id: I6e334014420757aafa436f42b189c932ed02ae56
This commit is contained in:
Eduardo Olivares 2025-01-10 10:37:02 +01:00
parent 7455a39f79
commit b73f595bad
7 changed files with 19 additions and 87 deletions
playbooks/infrared
roles
tests
tobiko-check-collected-files
tobiko-run/vars
tox.ini
zuul.d

@ -3,4 +3,3 @@
- hosts: primary
roles:
- tox
- tobiko-check-collected-files

@ -50,10 +50,3 @@
debug: var=run_tox.stderr_lines
when: run_tox is failed
failed_when: yes
- hosts: primary
vars:
test_collect_dir: '{{ test_dir }}/test_results'
roles:
- tobiko-check-collected-files

@ -1,4 +0,0 @@
---
dependencies:
- role: tobiko-common

@ -1,39 +0,0 @@
---
- name: "find for collected files in '{{ test_collect_dir }}'"
find:
paths:
- "{{ test_collect_dir }}"
patterns:
- "tobiko.conf"
- "tobiko.log"
- "{{ test_report_name }}*.log"
- "{{ test_report_name }}*.html"
- "{{ test_report_name }}*.xml"
register: find_collected_files
- name: "set collected_files fact"
set_fact:
collected_files: >
{{ find_collected_files.files |
map(attribute='path') |
map('basename') |
list }}
- block:
- name: "check collected files"
assert:
that:
- item in collected_files
loop:
- tobiko.log
- tobiko.conf
- '{{ test_report_name }}.log'
- '{{ test_report_name }}.html'
- '{{ test_report_name }}.xml'
rescue:
- debug: var=collected_files
failed_when: yes

@ -0,0 +1,10 @@
test_workflow_steps:
- tox_description: 'run unit tests using Python 3.9'
tox_envlist: py39
python_version: '3.9'
bindep_profile: test py39
test_flaky: true
- tox_description: 'run functional test cases'
tox_envlist: functional
test_flaky: true

@ -393,6 +393,7 @@ setenv =
IR_HOME = {env:IR_HOME:{envdir}/home/infrared}
IR_TOBIKO_PLUGIN = {env:IR_TOBIKO_PLUGIN:{toxinidir}/infrared_plugin}
IR_WORKSPACE_FILE = {env:IR_WORKSPACE_FILE:{toxinidir}/workspace.tgz}
IR_WORKFLOW = {env:IR_WORKFLOW:unit-functional}
SETUPTOOLS_USE_DISTUTILS = stdlib
commands_pre =
@ -401,6 +402,7 @@ commands_pre =
commands =
ir tobiko --tobiko-src-dir '{toxinidir}' \
--collect-dir '{env:TOX_REPORT_DIR}' \
--workflow '{env:IR_WORKFLOW}' \
{posargs}

@ -6,20 +6,19 @@
Infrared jobs intended to gate infrared Tobiko plugin changes
check:
jobs:
- tobiko-infrared-centos-9
- tobiko-infrared
gate:
jobs:
- tobiko-infrared
periodic:
jobs:
- tobiko-infrared-centos-9
- tobiko-infrared-ubuntu
- tobiko-infrared
- job:
name: tobiko-infrared
parent: tox
nodeset: centos-9-stream
nodeset: tobiko-infrared-single-node-centos-9
timeout: 3600
description: |
Run test cases using tobiko infrared plugin
@ -32,7 +31,7 @@
ensure_pip_from_packages_with_python2: no
test_collect_dir: '{{ zuul_output_dir }}/logs'
test_inventory_file: '{{ zuul_work_dir }}/ansible_hosts'
test_inventory_groups: {undercloud: [secondary]}
test_inventory_groups: {undercloud: [primary]}
tox_envlist: infrared
tox_extra_args: -- --collect-dir {{ test_collect_dir | quote }}
tox_environ:
@ -47,40 +46,12 @@
- ^tobiko/tests/scenario/
- ^tobiko/tests/faults/
- job:
name: tobiko-infrared-centos-9
parent: tobiko-infrared
nodeset: tobiko-infrared-centos-9
voting: true
description: |
Run test cases using tobiko infrared plugin on CentOS 9
- nodeset:
name: tobiko-infrared-centos-9
name: tobiko-infrared-single-node-centos-9
nodes:
- name: primary
label: centos-9-stream
- name: secondary
label: centos-9-stream
groups: &NODESET_GROUPS
groups:
- name: undercloud
nodes:
- secondary
- job:
name: tobiko-infrared-ubuntu
parent: tobiko-infrared
nodeset: tobiko-infrared-ubuntu
voting: true
description: |
Run test cases using tobiko infrared plugin on Ubuntu
- nodeset:
name: tobiko-infrared-ubuntu
nodes:
- name: primary
label: ubuntu-focal
- name: secondary
label: ubuntu-focal
groups: *NODESET_GROUPS
- primary