2017-07-13 15:13:41 -07:00
|
|
|
Upload logs to a static webserver
|
|
|
|
|
2019-01-22 14:18:09 -08:00
|
|
|
This uploads logs to a static server using SSH. The server must have
|
|
|
|
been previously added to the inventory; this can be done with the
|
|
|
|
:zuul:role:`add-fileserver` role; see that role's documentation for a
|
|
|
|
description of the site_logs secret in this example post-run playbook:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
- hosts: localhost
|
|
|
|
roles:
|
|
|
|
- role: add-fileserver
|
|
|
|
fileserver: "{{ site_logs }}"
|
|
|
|
|
|
|
|
- hosts: "{{ site_logs.fqdn }}"
|
|
|
|
gather_facts: False
|
|
|
|
roles:
|
|
|
|
- role: upload-logs
|
|
|
|
zuul_log_url: "http://logs.example.org"
|
2017-07-13 15:13:41 -07:00
|
|
|
|
2017-08-11 15:10:40 -07:00
|
|
|
**Role Variables**
|
2017-07-13 15:13:41 -07:00
|
|
|
|
2017-08-18 19:21:39 -05:00
|
|
|
.. zuul:rolevar:: zuul_log_url
|
|
|
|
|
|
|
|
Base URL where logs are to be found.
|
|
|
|
|
2017-08-11 15:10:40 -07:00
|
|
|
.. zuul:rolevar:: zuul_logserver_root
|
|
|
|
:default: /srv/static/logs
|
|
|
|
|
|
|
|
The root path to the logs on the logserver.
|
2018-01-25 11:55:47 -06:00
|
|
|
|
2018-05-10 18:16:47 -04:00
|
|
|
.. 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.
|
|
|
|
|
2018-03-27 08:06:05 -07:00
|
|
|
.. zuul:rolevar:: zuul_log_verbose
|
|
|
|
:default: false
|
|
|
|
|
|
|
|
The synchronize task in this role outputs a lot of information. By
|
|
|
|
default, no_log is set to avoid overwhelming a reader of the logs.
|
|
|
|
Set this to true to disable that behavior if it becomes necessary
|
|
|
|
to debug this role.
|
|
|
|
|
2018-01-25 11:55:47 -06:00
|
|
|
.. zuul:rolevar:: zuul_site_upload_logs
|
|
|
|
:default: true
|
|
|
|
|
|
|
|
Controls when logs are uploaded. true, the default, means always upload
|
|
|
|
logs. false means never upload logs. 'failure' means to only upload logs
|
|
|
|
when the job has failed.
|
|
|
|
|
|
|
|
.. note:: Intended to be set by admins via site-variables.
|
2019-09-04 17:50:11 -07:00
|
|
|
|
|
|
|
.. zuul:rolevar:: zuul_log_path_shard_build
|
|
|
|
:default: False
|
|
|
|
|
|
|
|
This var is consumed by set-zuul-log-path-fact which upload-logs
|
|
|
|
calls into. If you set this you will get log paths prefixed with the
|
|
|
|
first three characters of the build uuid. This will improve log file
|
|
|
|
sharding.
|
|
|
|
|
|
|
|
More details can be found at
|
|
|
|
:zuul:rolevar:`set-zuul-log-path-fact.zuul_log_path_shard_build`.
|