diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py
index 8bd6288da..003c6391c 100644
--- a/jenkins_jobs/modules/publishers.py
+++ b/jenkins_jobs/modules/publishers.py
@@ -3793,6 +3793,14 @@ def warnings(registry, xml_parent, data):
:arg str files-to-ignore: Comma separated list of regular expressions
that specifies the files to exclude from the report (based on their
absolute filename). (default '')
+ :arg str messages-to-ignore: Newline separated list of regular
+ expressions that specifies the warning messages to exclude form the
+ report (based on the warning messages). By default all warning
+ messages are included
+ :arg str categories-to-ignore: Newline separated list of regular
+ expressions that specifies the warning messages to exclude form the
+ report (based on the warning categories). By default all warning
+ categories are included
:arg bool run-always: By default, this plug-in runs only for stable or
unstable builds, but not for failed builds. Set to true if the
plug-in should run even for failed builds. (default false)
@@ -3914,6 +3922,8 @@ def warnings(registry, xml_parent, data):
warnings_mappings = [
('files-to-include', 'includePattern', ''),
('files-to-ignore', 'excludePattern', ''),
+ ('messages-to-ignore', 'messagesPattern', ''),
+ ('categories-to-ignore', 'categoriesPattern', ''),
('plugin-name', 'pluginName', '[WARNINGS]'),
('run-always', 'canRunOnFailed', False),
('detect-modules', 'shouldDetectModules', False),
diff --git a/tests/publishers/fixtures/warnings-full.xml b/tests/publishers/fixtures/warnings-full.xml
index d3bfc473f..309afac4a 100644
--- a/tests/publishers/fixtures/warnings-full.xml
+++ b/tests/publishers/fixtures/warnings-full.xml
@@ -22,6 +22,10 @@
[a-zA-Z]\.java,[a-zA-Z]\.cpp
[a-zA-Z]\.html,[a-zA-Z]\.js
+ ^Test results:.*
+No sources found skipping Kotlin compile
+ WARN.*
+ERROR
[WARNINGS]
true
true
diff --git a/tests/publishers/fixtures/warnings-full.yaml b/tests/publishers/fixtures/warnings-full.yaml
index 17d005d65..43710b7eb 100644
--- a/tests/publishers/fixtures/warnings-full.yaml
+++ b/tests/publishers/fixtures/warnings-full.yaml
@@ -10,6 +10,12 @@ publishers:
scanner: FxCop
files-to-include: '[a-zA-Z]\.java,[a-zA-Z]\.cpp'
files-to-ignore: '[a-zA-Z]\.html,[a-zA-Z]\.js'
+ messages-to-ignore: |-
+ ^Test results:.*
+ No sources found skipping Kotlin compile
+ categories-to-ignore: |-
+ WARN.*
+ ERROR
run-always: true
detect-modules: true
resolve-relative-paths: true
diff --git a/tests/publishers/fixtures/warnings-minimal.xml b/tests/publishers/fixtures/warnings-minimal.xml
index e26b4f512..6702e2a30 100644
--- a/tests/publishers/fixtures/warnings-minimal.xml
+++ b/tests/publishers/fixtures/warnings-minimal.xml
@@ -6,6 +6,8 @@
+
+
[WARNINGS]
false
false