From 24ed36fa3444dbd35537549d0c3ca3e0a31dad0f Mon Sep 17 00:00:00 2001
From: Clark Boylan <clark.boylan@gmail.com>
Date: Tue, 10 Mar 2020 15:50:45 -0700
Subject: [PATCH] Pull goaccess report into zuul logs

This will be our first step at publishing these publicly.

Change-Id: I7a2eb4ace5f76b8853867e1b4a767e5f3830ce96
---
 playbooks/periodic/goaccess.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/playbooks/periodic/goaccess.yaml b/playbooks/periodic/goaccess.yaml
index 90f3a207b3..ade92439ae 100644
--- a/playbooks/periodic/goaccess.yaml
+++ b/playbooks/periodic/goaccess.yaml
@@ -58,3 +58,12 @@
         ( cat ${SOURCE_FILE}{,.1} ; zcat ${SOURCE_FILE}.*.gz ) | goaccess -o $OUT_FILE -p /home/zuul/goaccess.conf -
       args:
         executable: /bin/bash
+    # Not using normal zuul job roles as static.opendev.org is not a
+    # test node with all the normal bits in place.
+    # TODO: should this be an artifact instead?
+    - name: Collect log output
+      synchronize:
+        dest: "{{ zuul.executor.log_root }}/{{ goaccess_site }}_goaccess_report.html"
+        mode: pull
+        src: "/home/zuul/{{ goaccess_site }}_goaccess_report.html"
+        verify_host: true