Adding coverage.py publisher for ShiningPanda Plugin
This publisher allows publishing coverage.py HTML reports using ShiningPanda Plugin https://wiki.jenkins-ci.org/display/JENKINS/ShiningPanda+Plugin Change-Id: I3040806a6cd49d7cfc423a39288729724f1ca223
This commit is contained in:
parent
983c2ec1ff
commit
5c1588a3bf
@ -4009,6 +4009,27 @@ def dry(parser, xml_parent, data):
|
||||
xml_config.text = str(config_value)
|
||||
|
||||
|
||||
def shining_panda(parser, xml_parent, data):
|
||||
"""yaml: shining-panda
|
||||
Publish coverage.py results. Requires the Jenkins `ShiningPanda Plugin.
|
||||
<https://wiki.jenkins-ci.org/display/JENKINS/ShiningPanda+Plugin>`_.
|
||||
|
||||
:arg str html-reports-directory: path to coverage.py html results
|
||||
(optional)
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/publishers/fixtures/shiningpanda001.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
shining_panda_plugin = XML.SubElement(
|
||||
xml_parent,
|
||||
'jenkins.plugins.shiningpanda.publishers.CoveragePublisher')
|
||||
if 'html-reports-directory' in data:
|
||||
XML.SubElement(shining_panda_plugin, 'htmlDir').text = str(
|
||||
data['html-reports-directory'])
|
||||
|
||||
|
||||
def create_publishers(parser, action):
|
||||
dummy_parent = XML.Element("dummy")
|
||||
parser.registry.dispatch('publisher', parser, dummy_parent, action)
|
||||
|
@ -164,6 +164,7 @@ jenkins_jobs.publishers =
|
||||
s3=jenkins_jobs.modules.publishers:s3
|
||||
scan-build=jenkins_jobs.modules.publishers:scan_build
|
||||
scp=jenkins_jobs.modules.publishers:scp
|
||||
shining-panda=jenkins_jobs.modules.publishers:shining_panda
|
||||
sitemonitor=jenkins_jobs.modules.publishers:sitemonitor
|
||||
sloccount=jenkins_jobs.modules.publishers:sloccount
|
||||
sonar=jenkins_jobs.modules.publishers:sonar
|
||||
|
8
tests/publishers/fixtures/shiningpanda001.xml
Normal file
8
tests/publishers/fixtures/shiningpanda001.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<jenkins.plugins.shiningpanda.publishers.CoveragePublisher>
|
||||
<htmlDir>foo/bar/coveragepy_html_report/</htmlDir>
|
||||
</jenkins.plugins.shiningpanda.publishers.CoveragePublisher>
|
||||
</publishers>
|
||||
</project>
|
3
tests/publishers/fixtures/shiningpanda001.yaml
Normal file
3
tests/publishers/fixtures/shiningpanda001.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
publishers:
|
||||
- shining-panda:
|
||||
html-reports-directory: foo/bar/coveragepy_html_report/
|
Loading…
x
Reference in New Issue
Block a user