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:
Ilia Meerovich 2015-01-26 15:40:21 +02:00
parent 983c2ec1ff
commit 5c1588a3bf
4 changed files with 33 additions and 0 deletions

View File

@ -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)

View File

@ -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

View 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>

View File

@ -0,0 +1,3 @@
publishers:
- shining-panda:
html-reports-directory: foo/bar/coveragepy_html_report/