From 08524b447ba8fee86aeee3c817272ff4d3c4e4be Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 13 Jul 2017 18:55:54 -0500 Subject: [PATCH] gzip console log before uploading it Maybe let's not be storing uncompressed log files, k? Change-Id: I3ca2299d59e2dbb976d742a5d4d1ddf6acc16ffb --- roles/upload-logs/tasks/main.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/roles/upload-logs/tasks/main.yaml b/roles/upload-logs/tasks/main.yaml index 24a47afff..5d462dd93 100644 --- a/roles/upload-logs/tasks/main.yaml +++ b/roles/upload-logs/tasks/main.yaml @@ -19,4 +19,18 @@ synchronize: src: "{{ zuul.executor.log_root }}/" dest: "{{zuul_logserver_root}}/{{ log_path }}/" + rsync_opts: + - "--exclude=job-output.txt" no_log: true + +# After this point there are no more logs +- name: gzip console log + delegate_to: localhost + archive: + path: "{{ zuul.executor.log_root }}/job-output.txt" + +- name: Upload console log + synchronize: + src: "{{ zuul.executor.log_root }}/job-output.txt.gz" + dest: "{{zuul_logserver_root}}/{{ log_path }}/job-output.txt.gz" + verify_host: true