File: zuul_post_logs.yaml

package info (click to toggle)
python-ara 1.5.8-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,460 kB
  • sloc: python: 6,493; sh: 215; makefile: 15; javascript: 2
file content (63 lines) | stat: -rw-r--r-- 2,267 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
#  Copyright (c) 2020 Red Hat, Inc.
#
#  This file is part of ARA Records Ansible.
#
#  ARA Records Ansible is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  ARA Records Ansible is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with ARA Records Ansible. If not, see <http://www.gnu.org/licenses/>.

- name: Recover API server data
  hosts: ara-api-server
  gather_facts: yes
  vars:
    ara_api_root_dir: "{{ ansible_user_dir }}/.ara-tests"
  tasks:
    # The zuul-output directory is retrieved by the fetch-output role
    # https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/fetch-output
    - name: Create log directory
      file:
        path: "{{ ansible_user_dir }}/zuul-output/logs"
        state: directory
        recurse: yes

    - name: Recover integration test data
      command: cp -rp {{ ara_api_root_dir }}/server {{ ansible_user_dir }}/zuul-output/logs/server
      ignore_errors: yes

    - name: Link the static report to the Zuul build with multiple nodes
      zuul_return:
        data:
          zuul:
            artifacts:
               - name: "Integration test static report for {{ inventory_hostname }}"
                 url: "{{ inventory_hostname }}/server/static/index.html"
      when: groups['all'] | length > 1

    - name: Link the static report to the Zuul build with a single node
      zuul_return:
        data:
          zuul:
            artifacts:
               - name: Integration test static report
                 url: "server/static/index.html"
      when: groups['all'] | length == 1

# Temporarily disable this to prevent "Executing local code is prohibited"
# https://review.opendev.org/#/c/742229/
#- name: Generate Zuul ARA report
#  hosts: localhost
#  vars:
#    ara_report_type: html
#    ara_report_path: ara-report
#  roles:
#    - ara-report