Remove obsolete roles

Change-Id: Ie202073bf9b00fe153abbce5a045b2ef8c8fc123
This commit is contained in:
Federico Ressi 2020-04-29 12:10:20 +02:00
parent ea84e96385
commit 44e1386cd4
14 changed files with 0 additions and 356 deletions

View File

@ -1,22 +0,0 @@
Generate stackviz report.
Generate stackviz report using subunit and dstat data, using
the stackviz archive embedded in test images.
**Role Variables**
.. zuul:rolevar:: devstack_base_dir
:default: /opt/stack
The devstack base directory.
.. zuul:rolevar:: stage_dir
:default: "{{ ansible_user_dir }}"
The stage directory where the input data can be found and
the output will be produced.
.. zuul:rolevar:: zuul_work_dir
:default: {{ devstack_base_dir }}/tempest
Directory to work in. It has to be a fully qualified path.

View File

@ -1,3 +0,0 @@
devstack_base_dir: /opt/stack
stage_dir: "{{ ansible_user_dir }}"
zuul_work_dir: "{{ devstack_base_dir }}/tempest"

View File

@ -1,65 +0,0 @@
- name: Check if stackviz archive exists
stat:
path: "/opt/cache/files/stackviz-latest.tar.gz"
register: stackviz_archive
- debug:
msg: "Stackviz archive could not be found in /opt/cache/files/stackviz-latest.tar.gz"
when: not stackviz_archive.stat.exists
- name: Check if subunit data exists
stat:
path: "{{ zuul_work_dir }}/testrepository.subunit"
register: subunit_input
- debug:
msg: "Subunit file could not be found at {{ zuul_work_dir }}/testrepository.subunit"
when: not subunit_input.stat.exists
- name: Install stackviz
pip:
name: "file://{{ stackviz_archive.stat.path }}"
virtualenv: /tmp/stackviz
extra_args: -U
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- name: Deploy stackviz static html+js
command: cp -pR /tmp/stackviz/share/stackviz-html {{ stage_dir }}/stackviz
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- name: Check if dstat data exists
stat:
path: "{{ devstack_base_dir }}/logs/dstat-csv.log"
register: dstat_input
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- name: Run stackviz with dstat
shell: |
cat {{ subunit_input.stat.path }} | \
/tmp/stackviz/bin/stackviz-export \
--dstat "{{ devstack_base_dir }}/logs/dstat-csv.log" \
--env --stdin \
{{ stage_dir }}/stackviz/data
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- dstat_input.stat.exists
failed_when: False
- name: Run stackviz without dstat
shell: |
cat {{ subunit_input.stat.path }} | \
/tmp/stackviz/bin/stackviz-export \
--env --stdin \
{{ stage_dir }}/stackviz/data
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- not dstat_input.stat.exists
failed_when: False

View File

@ -1,64 +0,0 @@
---
# Tobiko workflow flags
tobiko_pre_run: true
tobiko_run: "{{ tobiko_run_tests or tobiko_run_faults }}"
tobiko_run_tests: true
tobiko_run_faults: false
tobiko_post_run: true
# Tobiko sources tobiko directory
tobiko_source_dir: "{{ role_path | dirname | dirname }}"
tobiko_dir: "{{ ansible_env.HOME }}/src/tobiko"
tobiko_user: "{{ ansible_user }}"
# Configuration options
tobiko_conf_file: /etc/tobiko/tobiko.conf
tobiko_default_conf:
DEFAULT:
debug: "{{ tobiko_debug }}"
log_dir: "{{ tobiko_log_file | dirname }}"
log_file: "{{ tobiko_log_file | basename }}"
tobiko_conf: {}
# Logging options
tobiko_debug: True
tobiko_log_file: "{{ tobiko_dir }}/tobiko.log"
# Output directories where tobiko should write to
tobiko_output_dirs:
- "{{ tox_dir }}"
- "{{ tobiko_log_file | dirname }}"
- "{{ test_report_dir }}"
tobiko_become_user: ''
# Python parameteres
python_version: ''
python_command: "{{ tobiko_dir }}/tools/ci/python"
# Tobiko tox parameters
tox_dir: "{{ tobiko_dir }}"
tox_command: "{{ tobiko_dir }}/tools/ci/tox"
tox_envlist: scenario
tox_extra_args: ''
tox_posargs: ''
# Tobiko test report parameters
test_report_dir: "{{ tobiko_log_file | dirname }}"
test_report_prefix: tobiko_results_
test_report_name: "01_{{ tox_envlist }}"
collect_files_dir: "{{ zuul.executor.log_root }}"
compress_collected_files: false
compressed_files_suffix:
"{% if (compress_collected_files | bool) %}.gz{% endif %}"

View File

@ -1,28 +0,0 @@
---
- become: yes
become_user: "{{ tobiko_user }}"
environment:
PYTHON_VERSION: "{{ python_version }}"
block:
- when: tobiko_pre_run | bool
block:
- include: pre/source.yaml
- include: pre/config.yaml
- include: pre/output.yaml
- include: pre/tools.yaml
- when: tobiko_run | bool
block:
- include: run/tests.yaml
when: tobiko_run_tests | bool
- include: run/faults.yaml
when: tobiko_run_faults | bool
- when: tobiko_post_run | bool
block:
- include: post/config.yaml
- include: post/report.yaml
- include: post/log.yaml

View File

@ -1,15 +0,0 @@
---
- name: check if {{ tobiko_conf_file }} file exists
stat:
path: "{{ tobiko_conf_file }}"
register: check_tobiko_conf_file
- name: "Collect {{ tobiko_conf_file }} file"
synchronize:
dest: "{{ collect_files_dir }}"
mode: pull
src: "{{ tobiko_conf_file }}"
verify_host: true
when: check_tobiko_conf_file.stat.exists

View File

@ -1,15 +0,0 @@
---
- name: check if {{ tobiko_log_file }} file exists
stat:
path: "{{ tobiko_log_file }}"
register: check_tobiko_log_file
- name: "Collect {{ tobiko_log_file }} file"
synchronize:
dest: "{{ collect_files_dir }}"
mode: pull
src: "{{ tobiko_log_file }}"
verify_host: true
when: check_tobiko_log_file.stat.exists

View File

@ -1,26 +0,0 @@
---
- name: "Look for test result files in {{ test_report_dir }}"
find:
paths:
- "{{ test_report_dir }}"
patterns:
- "{{ test_report_prefix }}*.subunit"
- "{{ test_report_prefix }}*.html"
register: test_result_files
- name: "Compress test result files"
when: compress_collected_files | bool
archive:
path: "{{ item.path }}"
with_items: "{{ test_result_files.files }}"
- name: "Collect test result files"
synchronize:
dest: "{{ collect_files_dir }}"
mode: pull
src: "{{ item.path }}{{ compressed_files_suffix }}"
verify_host: true
with_items: "{{ test_result_files.files }}"

View File

@ -1,47 +0,0 @@
---
- become: yes
become_user: root
block:
- name: "flattern tobiko configuration"
set_fact:
tobiko_conf_yaml: |
{% for section, options in (sections.items() | sort) %}
{% for option, value in (options.items() | sort) %}
- section: "{{ section }}"
option: "{{ option }}"
value: "{{ value }}"
{% endfor %}
{% endfor %}
vars:
sections: "{{ tobiko_default_conf | combine(tobiko_conf, recursive=True) }}"
- name: "show tobiko configuration"
debug:
msg: |
Tobiko configuration:
{{ tobiko_conf_yaml }}
- name: "provide {{ tobiko_conf_file }} file"
ini_file:
path: "{{ tobiko_conf_file }}"
section: "{{ item.section }}"
option: "{{ item.option }}"
value: "{{ item.value }}"
owner: root
mode: '0644'
when:
- item.section
- item.option
- item.value
loop: "{{ tobiko_conf_yaml | from_yaml | list }}"
- name: "read {{ tobiko_conf_file }} file"
slurp:
src: "{{ tobiko_conf_file }}"
register: read_tobiko_conf_file
- name: "show {{ tobiko_conf_file }} file"
debug:
msg: "{{ read_tobiko_conf_file['content'] | b64decode }}"

View File

@ -1,13 +0,0 @@
---
- become: yes
become_user: root
block:
- name: "Ensure Tobiko output directories are writable by {{ tobiko_user }} user"
file:
path: "{{ item | realpath }}"
state: directory
owner: '{{ tobiko_user }}'
mode: '0755'
loop: "{{ tobiko_output_dirs | unique }}"

View File

@ -1,15 +0,0 @@
---
- name: "Check {{ tobiko_dir }} directory exists"
stat:
path: "{{ tobiko_dir | realpath }}"
register: tobiko_dir_stat
- name: "Copy tobiko source code to node: {{ tobiko_source_dir }}/* -> {{ tobiko_dir }}"
synchronize:
src: "{{ tobiko_source_dir | realpath }}/."
dest: "{{ tobiko_dir | realpath }}"
use_ssh_args: true
recursive: true
when: "not tobiko_dir_stat.stat.exists"

View File

@ -1,16 +0,0 @@
---
- name: "Check Python command '{{ python_command }}'"
command: "{{ python_command }} --version"
- name: "Check Python command version is '{{ python_version }}'"
command: |
{{ python_command }} '{{ tobiko_dir }}/tools/ci/python_version' \
--check-prefix
- name: "Check Tox command: '{{ tox_command }}'"
command:
chdir: "{{ tox_dir }}"
cmd: "{{ tox_command }} --version"

View File

@ -1,13 +0,0 @@
---
- include: tests.yaml
vars:
tox_envlist: faults
test_report_name: "02_faults"
- include: tests.yaml
environment:
TOBIKO_PREVENT_CREATE=true
vars:
test_report_name: "03_{{ tox_envlist }}_after_faults"

View File

@ -1,14 +0,0 @@
---
- name: "Run test '{{ tox_envlist }}' test cases from '{{ tox_dir }}'"
shell:
chdir: "{{ tox_dir }}"
cmd: |
{{ tox_command }} -e '{{ tox_envlist }}' {{ tox_extra_args }} -- \
{{ tox_posargs }}
exit_status=$?
{{ tox_command }} -c '{{ tobiko_dir }}' -e report
exit "${exit_status}"
environment:
TOBIKO_TEST_REPORT_DIR: "{{ test_report_dir }}"
TOBIKO_TEST_REPORT_NAME: "{{ test_report_prefix }}{{ test_report_name }}"