summaryrefslogtreecommitdiffstats
path: root/jenkins_jobs/modules/reporters.py
diff options
context:
space:
mode:
authorThanh Ha <thanh.ha@linuxfoundation.org>2015-03-16 22:00:11 -0400
committerThanh Ha <thanh.ha@linuxfoundation.org>2015-03-19 18:42:42 -0400
commitbce1eead19bc85e51e6fc77994dfd103245ec9be (patch)
tree467a377c38aab20ca0f97216334f1f0eb38b2c48 /jenkins_jobs/modules/reporters.py
parent0aa95b48913a2b27c330d9402447b0704ddbb581 (diff)
downloadpython-jenkins-job-builder-bce1eead19bc85e51e6fc77994dfd103245ec9be.tar.gz
python-jenkins-job-builder-bce1eead19bc85e51e6fc77994dfd103245ec9be.tar.xz
python-jenkins-job-builder-bce1eead19bc85e51e6fc77994dfd103245ec9be.zip
Add FindBugs support to Publishers
FindBugs can also be configured as a publisher in non-Maven job types. This work is a follow up to previous work from: https://review.openstack.org/#/c/153911/ - Adds support for configuring findbugs from a publisher context - Move FindBugs specific options into a findbugs_settings() helper function Change-Id: I1bead8b8ade4288243180c19435da9bb51b2a0df Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Diffstat (limited to 'jenkins_jobs/modules/reporters.py')
-rw-r--r--jenkins_jobs/modules/reporters.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/jenkins_jobs/modules/reporters.py b/jenkins_jobs/modules/reporters.py
index 75c6a092..5cc813fe 100644
--- a/jenkins_jobs/modules/reporters.py
+++ b/jenkins_jobs/modules/reporters.py
@@ -35,6 +35,7 @@ Example::
import xml.etree.ElementTree as XML
import jenkins_jobs.modules.base
from jenkins_jobs.modules.helpers import build_trends_publisher
+from jenkins_jobs.modules.helpers import findbugs_settings
from jenkins_jobs.errors import JenkinsJobsException
@@ -132,18 +133,7 @@ def findbugs(parser, xml_parent, data):
'hudson.plugins.findbugs.FindBugsReporter')
findbugs.set('plugin', 'findbugs')
- # General Options
- rank_priority = str(data.get('rank-priority', False)).lower()
- XML.SubElement(findbugs, 'isRankActivated').text = rank_priority
- include_files = data.get('include-files', '')
- XML.SubElement(findbugs, 'includePattern').text = include_files
- exclude_files = data.get('exclude-files', '')
- XML.SubElement(findbugs, 'excludePattern').text = exclude_files
- use_previous_build = str(data.get('use-previous-build-as-reference',
- False)).lower()
- XML.SubElement(findbugs,
- 'usePreviousBuildAsReference').text = use_previous_build
-
+ findbugs_settings(findbugs, data)
build_trends_publisher('[FINDBUGS] ', findbugs, data)