From 674e7347e4697f917de457ae4d1c1fae5178a684 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 18 Aug 2017 19:21:39 -0500 Subject: [PATCH] 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 --- roles/upload-logs/README.rst | 4 ++++ roles/upload-logs/tasks/main.yaml | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/roles/upload-logs/README.rst b/roles/upload-logs/README.rst index 969d07cf9..ecc45165d 100644 --- a/roles/upload-logs/README.rst +++ b/roles/upload-logs/README.rst @@ -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 diff --git a/roles/upload-logs/tasks/main.yaml b/roles/upload-logs/tasks/main.yaml index 92894fae3..778d97891 100644 --- a/roles/upload-logs/tasks/main.yaml +++ b/roles/upload-logs/tasks/main.yaml @@ -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