Skip to content

Commit a54ba1a

Browse files
committed
Compress all log and artifact files that are in zuul-output dir
Sometimes the logs might be huge and we are out of the storage on the log server. Let's try to compress all files before upload. According to the current Apache vhost config [1], all files with .gz extension should be tread as a "text/html". [1] https://github.com/softwarefactory-project/sf-config/blob/master/ansible/roles/sf-logserver/templates/logserver.conf.j2 Signed-off-by: Daniel Pawlik <[email protected]>
1 parent deb0713 commit a54ba1a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ci/playbooks/collect-logs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@
139139
dest: "{{ ansible_user_dir }}/zuul-output/logs/docs_build"
140140

141141
always:
142+
- name: Compress logs bigger than 2MB
143+
when: cifmw_compress_all_logs | default(true)
144+
ansible.builtin.shell: >
145+
find "{{ ansible_user_dir }}/zuul-output/"
146+
-type f
147+
! -name "*.gz"
148+
! -name "*.xz"
149+
-size +2M
150+
-exec gzip "{}" +
151+
142152
- name: Copy files from workspace on node
143153
vars:
144154
work_dir: "{{ ansible_user_dir }}/workspace"

0 commit comments

Comments
 (0)