Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ci/playbooks/collect-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,21 @@
no_log: true
args:
chdir: "{{ ansible_user_dir }}/zuul-output/logs/"

- name: Compress logs bigger than 2MB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(non-blocking) thought: I thinks now this is a great candidate to pull out this two tasks somewhere to be imported.
If you agree I can work in the task.

when: cifmw_compress_all_logs | default(true)
ansible.builtin.shell: >
find "{{ ansible_user_dir }}/zuul-output/"
-type f
! -name "*.gz"
! -name "*.xz"
-size +2M
-exec gzip --best "{}" +
ignore_errors: true # noqa: ignore-errors

- name: Copy files from workspace on node
vars:
work_dir: "{{ ansible_user_dir }}/zuul-output/logs"
ansible.builtin.include_role:
name: fetch-output
ignore_errors: true # noqa: ignore-errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(non-blocking) question: do we want to ignore here errors? I'm OK with this, but should we ignore errors in L 156?

18 changes: 18 additions & 0 deletions ci/playbooks/e2e-collect-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,21 @@
no_log: true
args:
chdir: "{{ ansible_user_dir }}/zuul-output/logs/"

- name: Compress logs bigger than 2MB
when: cifmw_compress_all_logs | default(true)
ansible.builtin.shell: >
find "{{ ansible_user_dir }}/zuul-output/"
-type f
! -name "*.gz"
! -name "*.xz"
-size +2M
-exec gzip --best "{}" +
ignore_errors: true # noqa: ignore-errors

- name: Copy files from workspace on node
vars:
work_dir: "{{ ansible_user_dir }}/zuul-output/logs"
ansible.builtin.include_role:
name: fetch-output
ignore_errors: true # noqa: ignore-errors