Add Slack 2.2 new settings

The slack plugin added the "includeFailedTests" and "notifyRegression" options.
This review adds those two options, along with unit tests for them.

Change-Id: I256933d3d25c09c72c688928e9068fe66f23055b
This commit is contained in:
Andrew Mellen 2018-04-25 11:20:42 -04:00
parent f95db7c756
commit c3c2802d4f
4 changed files with 14 additions and 0 deletions

View File

@ -6635,6 +6635,12 @@ def slack(registry, xml_parent, data):
:arg bool notify-repeated-failure: Send notification when job fails
successively (previous build was also a failure) (>=2.0).
(default false)
:arg bool notify-regression: Send notification when number of failed tests
increased or the failed tests are different than previous build
(>=2.2). (default false)
:arg bool include-failed-tests: includes all failed tests when some tests
failed. does nothing if no failed tests were found (>=2.2).
(default false)
:arg bool include-test-summary: Include the test summary (>=2.0).
(default false)
:arg str commit-info-choice: What commit information to include into
@ -6699,8 +6705,10 @@ def slack(registry, xml_parent, data):
('notify-unstable', 'notifyUnstable', False),
('notify-failure', 'notifyFailure', False),
('notify-back-to-normal', 'notifyBackToNormal', False),
('notify-regression', 'notifyRegression', False),
('notify-repeated-failure', 'notifyRepeatedFailure', False),
('include-test-summary', 'includeTestSummary', False),
('include-failed-tests', 'includeFailedTests', False),
('commit-info-choice', 'commitInfoChoice', 'NONE'),
('include-custom-message', 'includeCustomMessage', False),
('custom-message', 'customMessage', ''),

View File

@ -14,8 +14,10 @@
<notifyUnstable>false</notifyUnstable>
<notifyFailure>false</notifyFailure>
<notifyBackToNormal>false</notifyBackToNormal>
<notifyRegression>false</notifyRegression>
<notifyRepeatedFailure>false</notifyRepeatedFailure>
<includeTestSummary>false</includeTestSummary>
<includeFailedTests>false</includeFailedTests>
<commitInfoChoice>NONE</commitInfoChoice>
<includeCustomMessage>false</includeCustomMessage>
<customMessage/>

View File

@ -14,8 +14,10 @@
<notifyUnstable>true</notifyUnstable>
<notifyFailure>true</notifyFailure>
<notifyBackToNormal>true</notifyBackToNormal>
<notifyRegression>true</notifyRegression>
<notifyRepeatedFailure>true</notifyRepeatedFailure>
<includeTestSummary>true</includeTestSummary>
<includeFailedTests>true</includeFailedTests>
<commitInfoChoice>AUTHORS_AND_TITLES</commitInfoChoice>
<includeCustomMessage>true</includeCustomMessage>
<customMessage>A custom message.</customMessage>

View File

@ -13,7 +13,9 @@ publishers:
notify-failure: True
notify-back-to-normal: True
notify-repeated-failure: True
notify-regression: True
include-test-summary: True
include-failed-tests: True
commit-info-choice: 'AUTHORS_AND_TITLES'
include-custom-message: True
custom-message: 'A custom message.'