Update scoverage to use convert xml
- Update docs for options to have default values - Add plugin="scoverage" attribute - Update documentation to use 4 space indentation Change-Id: Ib12541a45f884770e8369f98b43d3b78cca7d8ec Signed-off-by: Kien Ha <kienha9922@gmail.com>
This commit is contained in:
parent
d6add35e72
commit
62a349db4a
@ -5151,9 +5151,9 @@ def scoverage(parser, xml_parent, data):
|
||||
Requires the Jenkins :jenkins-wiki:`Scoverage Plugin <Scoverage+Plugin>`.
|
||||
|
||||
:arg str report-directory: This is a directory that specifies the locations
|
||||
where the xml scoverage report is generated
|
||||
where the xml scoverage report is generated (required)
|
||||
:arg str report-file: This is a file name that is given to the xml
|
||||
scoverage report.
|
||||
scoverage report (required)
|
||||
|
||||
Example:
|
||||
|
||||
@ -5163,10 +5163,14 @@ def scoverage(parser, xml_parent, data):
|
||||
scoverage = XML.SubElement(
|
||||
xml_parent,
|
||||
'org.jenkinsci.plugins.scoverage.ScoveragePublisher')
|
||||
XML.SubElement(scoverage, 'reportDir').text = str(
|
||||
data.get('report-directory', ''))
|
||||
XML.SubElement(scoverage, 'reportFile').text = str(
|
||||
data.get('report-file', ''))
|
||||
scoverage.set('plugin', 'scoverage')
|
||||
|
||||
mappings = [
|
||||
('report-directory', 'reportDir', None),
|
||||
('report-file', 'reportFile', None),
|
||||
]
|
||||
helpers.convert_mapping_to_xml(
|
||||
scoverage, data, mappings, fail_required=True)
|
||||
|
||||
|
||||
def display_upstream_changes(parser, xml_parent, data):
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<org.jenkinsci.plugins.scoverage.ScoveragePublisher>
|
||||
<org.jenkinsci.plugins.scoverage.ScoveragePublisher plugin="scoverage">
|
||||
<reportDir>target/scala-2.10/scoverage-report/</reportDir>
|
||||
<reportFile>scoverage.xml</reportFile>
|
||||
</org.jenkinsci.plugins.scoverage.ScoveragePublisher>
|
||||
|
Loading…
Reference in New Issue
Block a user