Merge "Add support for retries options in notifications"

This commit is contained in:
Zuul 2020-11-13 16:32:59 +00:00 committed by Gerrit Code Review
commit 8f48b73ea8
4 changed files with 8 additions and 2 deletions

View File

@ -41,9 +41,11 @@ def http_endpoint(registry, xml_parent, data):
:arg str event: job events that trigger notifications: started,
completed, finalized or all (default)
:arg str url: URL of the endpoint
:arg str timeout: Timeout in milliseconds for sending notification
:arg int timeout: Timeout in milliseconds for sending notification
request (30 seconds by default)
:arg str log: Number lines of log messages to send (0 by default).
:arg int retries: Nr of times to retry sending notification in case
sending notification fails. (0 by default)
:arg int log: Number lines of log messages to send (0 by default).
Use -1 for all (use with caution).
Example:
@ -65,6 +67,7 @@ def http_endpoint(registry, xml_parent, data):
("", "protocol", "HTTP"),
("", "event", event, supported_events),
("timeout", "timeout", 30000),
("retries", "retries", 0),
("url", "url", None),
("log", "loglines", 0),
]

View File

@ -8,6 +8,7 @@
<protocol>HTTP</protocol>
<event>all</event>
<timeout>30000</timeout>
<retries>0</retries>
<url>http://example.com/jenkins_endpoint</url>
<loglines>0</loglines>
</com.tikal.hudson.plugins.notification.Endpoint>

View File

@ -8,6 +8,7 @@
<protocol>HTTP</protocol>
<event>completed</event>
<timeout>40000</timeout>
<retries>5</retries>
<url>http://example.com/jenkins_endpoint</url>
<loglines>-1</loglines>
</com.tikal.hudson.plugins.notification.Endpoint>

View File

@ -5,3 +5,4 @@ notifications:
event: completed
timeout: 40000
log: -1
retries: 5