Add zuul_return call into upload-logs role

We can pass in the fileserver, but if you're using upload-logs, you're
going to need it to return data, so move this functionality into the
role.

Change-Id: I987b1060acd3e6d96519010673fd21eba781f162
This commit is contained in:
Monty Taylor 2017-08-18 19:21:39 -05:00
parent fa7507fd98
commit 674e7347e4
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
2 changed files with 13 additions and 0 deletions

View File

@ -4,6 +4,10 @@ This uploads logs to a static webserver using SSH.
**Role Variables**
.. zuul:rolevar:: zuul_log_url
Base URL where logs are to be found.
.. zuul:rolevar:: zuul_logserver_root
:default: /srv/static/logs

View File

@ -34,3 +34,12 @@
src: "{{ zuul.executor.log_root }}/job-output.txt.gz"
dest: "{{zuul_logserver_root}}/{{ log_path }}/job-output.txt.gz"
verify_host: true
post_tasks:
- name: Return log URL to Zuul
delegate_to: localhost
zuul_return:
data:
zuul:
log_url: "{{ zuul_log_url }}/{{ log_path }}/"
when: zuul_log_url is defined