Skip to content

Commit

Permalink
zuul: split upload from collect logs
Browse files Browse the repository at this point in the history
  • Loading branch information
elfiesmelfie committed Nov 27, 2023
1 parent f595330 commit d690c59
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
post-run:
- ci/post-debug_crc.yml
- ci/post-collect_logs.yml
- ci/post-upload_logs.yml
# Add these steps so we can work around the pre stage failing, and investigate whether CRC actually comes up, and whether it runs STF
#- ci/prepare.yml
#- ci/deploy_stf.yml
Expand Down
35 changes: 35 additions & 0 deletions ci/post-upload_logs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- hosts: all
name: Copy files from controller on node
gather_facts: false
tasks:
- name: "Set the sto_dir if it isn't already set"
ansible.builtin.set_fact:
sto_dir: '{{ ansible_env.HOME }}/{{ zuul.projects["github.com/infrawatch/service-telemetry-operator"].src_dir }}'
when: sto_dir | default('') | length == 0

- name: "Get vars common to all jobs"
ansible.builtin.include_vars:
file: "vars-zuul-common.yml"

- name: "Get scenario-specific vars"
ansible.builtin.include_vars:
file: "vars-{{ scenario }}.yml"

- name: "Create log dir"
ansible.builtin.file:
path: "{{ logfile_dir }}"
state: directory
mode: "0755"

- name: "Copy generated logs"
ansible.builtin.shell: |
cp {{ ansible_env.HOME }}/*.log .
args:
chdir: "{{ logfile_dir }}"
changed_when: true
ignore_errors: true

- name: Copy files from controller on node
ansible.builtin.include_role:
name: fetch-output

0 comments on commit d690c59

Please sign in to comment.