Allow upload-logs to toggle compression of console logs
We should make it easy for users to view console logs by default. Today, we compress and upload logs and by default apache / nginx will not properly display them as plain text. This commit changes the default to not compress, but allows more advanced users to enable this logic. As mostly likley it also means additional configuration for your web server. Change-Id: Ic446db4f85e2098db8fa4568f8c5140ba564e931 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
f740369099
commit
550e5da4b4
@ -29,6 +29,13 @@ description of the site_logs secret in this example post-run playbook:
|
||||
|
||||
The root path to the logs on the logserver.
|
||||
|
||||
.. zuul:rolevar:: zuul_log_compress
|
||||
:default: false
|
||||
|
||||
When enabled, the console logs Zuul produces will be compressed
|
||||
before uploading. You may need additional configuration for your web
|
||||
server to view these files.
|
||||
|
||||
.. zuul:rolevar:: zuul_log_verbose
|
||||
:default: false
|
||||
|
||||
|
@ -40,8 +40,9 @@
|
||||
with_items:
|
||||
- job-output.txt
|
||||
- job-output.json
|
||||
when: zuul_log_compress | bool
|
||||
|
||||
- name: Upload console log and json output
|
||||
- name: Upload compressed console log and json output
|
||||
synchronize:
|
||||
src: "{{ zuul.executor.log_root }}/{{ item }}.gz"
|
||||
dest: "{{ zuul_logserver_root }}/{{ zuul_log_path }}/{{ item }}.gz"
|
||||
@ -49,6 +50,17 @@
|
||||
with_items:
|
||||
- job-output.txt
|
||||
- job-output.json
|
||||
when: zuul_log_compress | bool
|
||||
|
||||
- name: Upload console log and json output
|
||||
synchronize:
|
||||
src: "{{ zuul.executor.log_root }}/{{ item }}"
|
||||
dest: "{{ zuul_logserver_root }}/{{ zuul_log_path }}/{{ item }}"
|
||||
verify_host: true
|
||||
with_items:
|
||||
- job-output.txt
|
||||
- job-output.json
|
||||
when: not zuul_log_compress | bool
|
||||
|
||||
- name: Return log URL to Zuul
|
||||
delegate_to: localhost
|
||||
|
@ -1,2 +1,3 @@
|
||||
zuul_logserver_root: /srv/static/logs
|
||||
zuul_log_compress: false
|
||||
zuul_log_verbose: false
|
||||
|
Loading…
Reference in New Issue
Block a user