diff --git a/jenkins_jobs/modules/notifications.py b/jenkins_jobs/modules/notifications.py
index b9c7840e6..196ed3bcd 100644
--- a/jenkins_jobs/modules/notifications.py
+++ b/jenkins_jobs/modules/notifications.py
@@ -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),
]
diff --git a/tests/notifications/fixtures/http-endpoint001.xml b/tests/notifications/fixtures/http-endpoint001.xml
index d9c5daebe..97ad4a983 100644
--- a/tests/notifications/fixtures/http-endpoint001.xml
+++ b/tests/notifications/fixtures/http-endpoint001.xml
@@ -8,6 +8,7 @@
HTTP
all
30000
+ 0
http://example.com/jenkins_endpoint
0
diff --git a/tests/notifications/fixtures/http-endpoint002.xml b/tests/notifications/fixtures/http-endpoint002.xml
index 7067958cf..d7ff4da48 100644
--- a/tests/notifications/fixtures/http-endpoint002.xml
+++ b/tests/notifications/fixtures/http-endpoint002.xml
@@ -8,6 +8,7 @@
HTTP
completed
40000
+ 5
http://example.com/jenkins_endpoint
-1
diff --git a/tests/notifications/fixtures/http-endpoint002.yaml b/tests/notifications/fixtures/http-endpoint002.yaml
index 7db02a1af..f6716b0fc 100644
--- a/tests/notifications/fixtures/http-endpoint002.yaml
+++ b/tests/notifications/fixtures/http-endpoint002.yaml
@@ -5,3 +5,4 @@ notifications:
event: completed
timeout: 40000
log: -1
+ retries: 5