Add support for sqlalchemy reporter
This will allow us to enter results from all jobs for
use with the openstack-health dashboard.
Depends-On: I08dbbb64b3daba915a94e455f75eef61ab392852
Change-Id: I28056d84a3f6abcd8d9038a91a6c9a3902142f90
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/doc/source/reporters.rst b/doc/source/reporters.rst
index 97bed4a..b01c8d1 100644
--- a/doc/source/reporters.rst
+++ b/doc/source/reporters.rst
@@ -34,7 +34,7 @@
A simple email reporter is also available.
A :ref:`connection` that uses the smtp driver must be supplied to the
-trigger.
+reporter.
SMTP Configuration
~~~~~~~~~~~~~~~~~~
@@ -60,3 +60,42 @@
to: you@example.com
from: alternative@example.com
subject: Change {change} failed
+
+SQL
+---
+
+This reporter is used to store results in a database.
+
+A :ref:`connection` that uses the sql driver must be supplied to the
+reporter.
+
+SQL Configuration
+~~~~~~~~~~~~~~~~~
+
+zuul.conf contains the database connection and credentials. To store different
+reports in different databases you'll need to create a new connection per
+database.
+
+The sql reporter is used to store the results from individual builds rather
+than the change. As such the sql reporter does nothing on "start" or
+"merge-failure".
+
+**score**
+ A score to store for the result of the build. eg: -1 might indicate a failed
+ build similar to the vote posted back via the gerrit reporter.
+
+For example ::
+
+ pipelines:
+ - name: post-merge
+ manager: IndependentPipelineManager
+ source: my_gerrit
+ trigger:
+ my_gerrit:
+ - event: change-merged
+ success:
+ mydb_conn:
+ score: 1
+ failure:
+ mydb_conn:
+ score: -1