Docs: reformat SMTP driver docs
Also, remove an unused parameter from the smtp reporter. Change-Id: I9c339b9c598b19bee16ad4fee31c9f5b39c6b6d0
This commit is contained in:
parent
7611ca021d
commit
fb0f716921
@ -9,25 +9,36 @@ when items report.
|
|||||||
Connection Configuration
|
Connection Configuration
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
**driver=smtp**
|
.. attr:: <smtp connection>
|
||||||
|
|
||||||
**server**
|
.. attr:: driver
|
||||||
SMTP server hostname or address to use.
|
:required:
|
||||||
``server=localhost``
|
|
||||||
|
|
||||||
**port**
|
.. value:: smtp
|
||||||
Optional: SMTP server port.
|
|
||||||
``port=25``
|
|
||||||
|
|
||||||
**default_from**
|
The connection must set ``driver=smtp`` for SMTP connections.
|
||||||
Who the email should appear to be sent from when emailing the report.
|
|
||||||
This can be overridden by individual pipelines.
|
|
||||||
``default_from=zuul@example.com``
|
|
||||||
|
|
||||||
**default_to**
|
.. attr:: server
|
||||||
Who the report should be emailed to by default.
|
:default: localhost
|
||||||
This can be overridden by individual pipelines.
|
|
||||||
``default_to=you@example.com``
|
SMTP server hostname or address to use.
|
||||||
|
|
||||||
|
.. attr:: port
|
||||||
|
:default: 25
|
||||||
|
|
||||||
|
SMTP server port.
|
||||||
|
|
||||||
|
.. attr:: default_from
|
||||||
|
:default: zuul
|
||||||
|
|
||||||
|
Who the email should appear to be sent from when emailing the report.
|
||||||
|
This can be overridden by individual pipelines.
|
||||||
|
|
||||||
|
.. attr:: default_to
|
||||||
|
:default: zuul
|
||||||
|
|
||||||
|
Who the report should be emailed to by default.
|
||||||
|
This can be overridden by individual pipelines.
|
||||||
|
|
||||||
Reporter Configuration
|
Reporter Configuration
|
||||||
----------------------
|
----------------------
|
||||||
@ -39,15 +50,38 @@ reporter. The connection also may specify a default *To* or *From*
|
|||||||
address.
|
address.
|
||||||
|
|
||||||
Each pipeline can overwrite the ``subject`` or the ``to`` or ``from`` address by
|
Each pipeline can overwrite the ``subject`` or the ``to`` or ``from`` address by
|
||||||
providing alternatives as arguments to the reporter. For example, ::
|
providing alternatives as arguments to the reporter. For example:
|
||||||
|
|
||||||
- pipeline:
|
.. code-block:: yaml
|
||||||
name: post-merge
|
|
||||||
success:
|
- pipeline:
|
||||||
outgoing_smtp:
|
name: post-merge
|
||||||
to: you@example.com
|
success:
|
||||||
failure:
|
outgoing_smtp:
|
||||||
internal_smtp:
|
to: you@example.com
|
||||||
to: you@example.com
|
failure:
|
||||||
from: alternative@example.com
|
internal_smtp:
|
||||||
subject: Change {change} failed
|
to: you@example.com
|
||||||
|
from: alternative@example.com
|
||||||
|
subject: Change {change} failed
|
||||||
|
|
||||||
|
.. attr:: pipeline.<reporter>.<smtp source>
|
||||||
|
|
||||||
|
To report via email, the dictionaries passed to any of the pipeline
|
||||||
|
:ref:`reporter<reporters>` attributes support the following
|
||||||
|
attributes:
|
||||||
|
|
||||||
|
.. attr:: to
|
||||||
|
|
||||||
|
The SMTP recipient address for the report. Multiple addresses
|
||||||
|
may be specified as one value separated by commas.
|
||||||
|
|
||||||
|
.. attr:: from
|
||||||
|
|
||||||
|
The SMTP sender address for the report.
|
||||||
|
|
||||||
|
.. attr:: subject
|
||||||
|
|
||||||
|
The Subject of the report email.
|
||||||
|
|
||||||
|
.. TODO: document subject string formatting.
|
||||||
|
@ -47,7 +47,6 @@ class SMTPReporter(BaseReporter):
|
|||||||
|
|
||||||
def getSchema():
|
def getSchema():
|
||||||
smtp_reporter = v.Schema({
|
smtp_reporter = v.Schema({
|
||||||
'connection': str,
|
|
||||||
'to': str,
|
'to': str,
|
||||||
'from': str,
|
'from': str,
|
||||||
'subject': str,
|
'subject': str,
|
||||||
|
Loading…
Reference in New Issue
Block a user