Support for link-to-last-build option in html publisher plugin

Change-Id: Ie3c0c99f3bdd54226e99477ad37983b11f2cf041
This commit is contained in:
Somay Jain 2015-08-12 15:56:46 +05:30
parent 347a231e07
commit 50790746f4
3 changed files with 7 additions and 0 deletions

View File

@ -2446,6 +2446,9 @@ def html_publisher(parser, xml_parent, data):
:arg str files: Specify the pages to display
:arg bool keep-all: keep HTML reports for each past build (Default False)
:arg bool allow-missing: Allow missing HTML reports (Default False)
:arg bool link-to-last-build: If this and 'keep-all' both are true, it
publishes the link on project level even if build failed.
(default false)
Example:
@ -2460,6 +2463,8 @@ def html_publisher(parser, xml_parent, data):
XML.SubElement(ptarget, 'reportName').text = data['name']
XML.SubElement(ptarget, 'reportDir').text = data['dir']
XML.SubElement(ptarget, 'reportFiles').text = data['files']
XML.SubElement(ptarget, 'alwaysLinkToLastBuild').text = str(
data.get('link-to-last-build', False)).lower()
keep_all = str(data.get('keep-all', False)).lower()
XML.SubElement(ptarget, 'keepAll').text = keep_all
allow_missing = str(data.get('allow-missing', False)).lower()

View File

@ -7,6 +7,7 @@
<reportName>some name</reportName>
<reportDir>path/</reportDir>
<reportFiles>index.html</reportFiles>
<alwaysLinkToLastBuild>true</alwaysLinkToLastBuild>
<keepAll>true</keepAll>
<allowMissing>true</allowMissing>
<wrapperName>htmlpublisher-wrapper.html</wrapperName>

View File

@ -5,3 +5,4 @@ publishers:
files: "index.html"
keep-all: true
allow-missing: true
link-to-last-build: true