Run ara-report on bridge in run-base-post

We can't run ARA on the executor because that involves running
arbitrary commands, instead generate reports on the executor and put
them where the normal fetch-output will find them later.

Change-Id: I20d88a7f03872d19f6bd014bc687a1bf16e4e80e
This commit is contained in:
Jeremy Stanley 2020-07-24 17:54:15 +00:00
parent 2f7959d5f2
commit 3d6cae8298

View File

@ -7,13 +7,6 @@
recurse: true
loop: "{{ query('inventory_hostnames', 'all') }}"
- name: Ensure bridge ARA log directories exist
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ zuul.executor.log_root }}/bridge.openstack.org/ara-report"
- hosts: all
tasks:
- include_role:
@ -50,15 +43,26 @@
recurse: yes
become: yes
# Note we convert to a HTML report with the ara-report role
# below
- name: Collect testing ARA results
synchronize:
dest: "{{ log_dir }}/ara-report/ansible.sqlite"
mode: pull
src: "/var/cache/ansible/ara.sqlite"
verify_host: true
ignore_errors: true
- name: Ensure ARA log directories exist
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ ansible_user_dir }}/zuul-output/logs/ara-report"
- name: Copy ARA database into report dir
copy:
remote_src: true
src: /var/cache/ansible/ara.sqlite
dest: "{{ ansible_user_dir }}/zuul-output/logs/ara-report/ara.sqlite"
- name: Create ARA report
include_role:
name: ara-report
vars:
ara_database_path: "{{ ansible_user_dir }}/zuul-output/logs/ara-report/ara.sqlite"
ara_report_path: "{{ ansible_user_dir }}/zuul-output/logs/ara-report/"
ara_report_type: html
- name: Collect ansible configuration
synchronize:
@ -69,13 +73,3 @@
rsync_opts:
- "--exclude=__pycache__"
ignore_errors: true
- hosts: localhost
tasks:
- name: Create bridge.o.o ARA report
include_role:
name: ara-report
vars:
ara_database_path: "{{ zuul.executor.log_root }}/bridge.openstack.org/ara-report/ansible.sqlite"
ara_report_path: "bridge.openstack.org/ara-report/"
ara_report_type: html