James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 1 | :title: SQL Driver |
| 2 | |
| 3 | SQL |
| 4 | === |
| 5 | |
| 6 | The SQL driver supports reporters only. Only one connection per |
| 7 | database is permitted. The connection options are: |
| 8 | |
| 9 | **driver=sql** |
| 10 | |
| 11 | **dburi** |
| 12 | Database connection information in the form of a URI understood by |
| 13 | sqlalchemy. eg http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html#database-urls |
| 14 | ``dburi=mysql://user:pass@localhost/db`` |
| 15 | |
| 16 | Reporter Configuration |
| 17 | ---------------------- |
| 18 | |
| 19 | This reporter is used to store results in a database. |
| 20 | |
| 21 | A :ref:`connection<connections>` that uses the sql driver must be |
| 22 | supplied to the reporter. |
| 23 | |
| 24 | zuul.conf contains the database connection and credentials. To store different |
| 25 | reports in different databases you'll need to create a new connection per |
| 26 | database. |
| 27 | |
| 28 | The SQL reporter does nothing on "start" or "merge-failure"; it only |
| 29 | acts on "success" or "failure" reporting stages. |
| 30 | |
| 31 | **score** |
| 32 | A score to store for the result of the build. eg: -1 might indicate a failed |
| 33 | build. |
| 34 | |
| 35 | For example :: |
| 36 | |
| 37 | - pipeline: |
| 38 | name: post-merge |
| 39 | success: |
| 40 | mydb_conn: |
| 41 | score: 1 |
| 42 | failure: |
| 43 | mydb_conn: |
| 44 | score: -1 |