added support for jdepend plugin
Change-Id: I6540b0238ebdad0b0763d596586e2e8702af7599
This commit is contained in:
parent
d4bff3529d
commit
2331f4c86a
@ -176,6 +176,27 @@ def javadoc(parser, xml_parent, data):
|
||||
'keep-all-successful', False)).lower()
|
||||
|
||||
|
||||
def jdepend(parser, xml_parent, data):
|
||||
"""yaml: jdepend
|
||||
Publish jdepend report
|
||||
Requires the :jenkins-wiki:`JDepend Plugin<JDepend+Plugin>`.
|
||||
|
||||
:arg str file: path to jdepend file (required)
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/publishers/fixtures/jdepend001.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
jdepend = XML.SubElement(
|
||||
xml_parent,
|
||||
'hudson.plugins.jdepend.JDependRecorder')
|
||||
filepath = data.get('file', None)
|
||||
if filepath is None:
|
||||
raise MissingAttributeError('file')
|
||||
XML.SubElement(jdepend, 'configuredJDependFile').text = str(filepath)
|
||||
|
||||
|
||||
def campfire(parser, xml_parent, data):
|
||||
"""yaml: campfire
|
||||
Send build notifications to Campfire rooms.
|
||||
|
@ -173,6 +173,7 @@ jenkins_jobs.publishers =
|
||||
jacoco=jenkins_jobs.modules.publishers:jacoco
|
||||
javadoc=jenkins_jobs.modules.publishers:javadoc
|
||||
jclouds=jenkins_jobs.modules.publishers:jclouds
|
||||
jdepend=jenkins_jobs.modules.publishers:jdepend
|
||||
jira=jenkins_jobs.modules.publishers:jira
|
||||
join-trigger=jenkins_jobs.modules.publishers:join_trigger
|
||||
junit=jenkins_jobs.modules.publishers:junit
|
||||
|
8
tests/publishers/fixtures/jdepend001.xml
Normal file
8
tests/publishers/fixtures/jdepend001.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<hudson.plugins.jdepend.JDependRecorder>
|
||||
<configuredJDependFile>build/jdepend/main.xml</configuredJDependFile>
|
||||
</hudson.plugins.jdepend.JDependRecorder>
|
||||
</publishers>
|
||||
</project>
|
3
tests/publishers/fixtures/jdepend001.yaml
Normal file
3
tests/publishers/fixtures/jdepend001.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
publishers:
|
||||
- jdepend:
|
||||
file: build/jdepend/main.xml
|
Loading…
Reference in New Issue
Block a user