diff --git a/ci/playbooks/collect-logs.yml b/ci/playbooks/collect-logs.yml index 62d0a8f7ad..b77d50d244 100644 --- a/ci/playbooks/collect-logs.yml +++ b/ci/playbooks/collect-logs.yml @@ -180,3 +180,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 diff --git a/ci/playbooks/e2e-collect-logs.yml b/ci/playbooks/e2e-collect-logs.yml index a1719a31a2..a006e70c22 100644 --- a/ci/playbooks/e2e-collect-logs.yml +++ b/ci/playbooks/e2e-collect-logs.yml @@ -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