Skip to content

Commit

Permalink
Add support for new 'notify every failure' option in Slack Plugin
Browse files Browse the repository at this point in the history
Change-Id: Idd48c5c0e595195aaecfee9aab7233cbf1d1a640
  • Loading branch information
lebauce committed Oct 4, 2019
1 parent fc63f14 commit 84c114c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jenkins_jobs/modules/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7402,6 +7402,8 @@ def slack(registry, xml_parent, data):
(>=2.0). (default false)
:arg bool notify-failure: Send notification when job fails for the first
time (previous build was a success) (>=2.0). (default false)
:arg bool notify-every-failure: Send notification everytime a job fails
(>=2.23). (default false)
:arg bool notify-back-to-normal: Send notification when job is succeeding
again after being unstable or failed (>=2.0). (default false)
:arg bool notify-repeated-failure: Send notification when job fails
Expand Down Expand Up @@ -7478,6 +7480,7 @@ def _add_xml(elem, name, value=""):
("notify-not-built", "notifyNotBuilt", False),
("notify-unstable", "notifyUnstable", False),
("notify-failure", "notifyFailure", False),
("notify-every-failure", "notifyEveryFailure", False),
("notify-back-to-normal", "notifyBackToNormal", False),
("notify-regression", "notifyRegression", False),
("notify-repeated-failure", "notifyRepeatedFailure", False),
Expand Down
1 change: 1 addition & 0 deletions tests/publishers/fixtures/slack003.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<notifyNotBuilt>false</notifyNotBuilt>
<notifyUnstable>false</notifyUnstable>
<notifyFailure>false</notifyFailure>
<notifyEveryFailure>false</notifyEveryFailure>
<notifyBackToNormal>false</notifyBackToNormal>
<notifyRegression>false</notifyRegression>
<notifyRepeatedFailure>false</notifyRepeatedFailure>
Expand Down
1 change: 1 addition & 0 deletions tests/publishers/fixtures/slack004.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<notifyNotBuilt>true</notifyNotBuilt>
<notifyUnstable>true</notifyUnstable>
<notifyFailure>true</notifyFailure>
<notifyEveryFailure>true</notifyEveryFailure>
<notifyBackToNormal>true</notifyBackToNormal>
<notifyRegression>true</notifyRegression>
<notifyRepeatedFailure>true</notifyRepeatedFailure>
Expand Down
1 change: 1 addition & 0 deletions tests/publishers/fixtures/slack004.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ publishers:
notify-not-built: True
notify-unstable: True
notify-failure: True
notify-every-failure: True
notify-back-to-normal: True
notify-repeated-failure: True
notify-regression: True
Expand Down

0 comments on commit 84c114c

Please sign in to comment.