Add support for Clang Scan-Build plugin version 1.7
The Clang Scan-Build plugin release 1.7 adds an option to specify the directory where the generated reports are expected. Without this change, builds that have a Scan-Build-Publisher configured fail with a NPE because the 'reportFolderName' element is missing in the config. Reference: https://issues.jenkins-ci.org/browse/JENKINS-18941 Change-Id: Ide3627a58198c81744f9c360f45929a23dce5d23
This commit is contained in:
parent
fda76531d9
commit
62f57fb5db
|
@ -4636,6 +4636,8 @@ def scan_build(parser, xml_parent, data):
|
|||
:arg int threshold: Threshold for marking builds as unstable (default 0)
|
||||
:arg string exclude-paths: Comma separated paths to exclude from reports
|
||||
(default '')
|
||||
:arg string report-folder: Folder where generated reports are located
|
||||
(default 'clangScanBuildReports')
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -4656,6 +4658,8 @@ def scan_build(parser, xml_parent, data):
|
|||
XML.SubElement(p, 'bugThreshold').text = threshold
|
||||
XML.SubElement(p, 'clangexcludedpaths').text = str(
|
||||
data.get('exclude-paths', ''))
|
||||
XML.SubElement(p, 'reportFolderName').text = str(
|
||||
data.get('report-folder', 'clangScanBuildReports'))
|
||||
|
||||
|
||||
def dry(parser, xml_parent, data):
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<markBuildUnstableWhenThresholdIsExceeded>true</markBuildUnstableWhenThresholdIsExceeded>
|
||||
<bugThreshold>0</bugThreshold>
|
||||
<clangexcludedpaths>external-lib</clangexcludedpaths>
|
||||
<reportFolderName>scan-build-report</reportFolderName>
|
||||
</jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher>
|
||||
</publishers>
|
||||
</project>
|
||||
|
|
|
@ -3,3 +3,4 @@ publishers:
|
|||
mark-unstable: true
|
||||
threshold: 0
|
||||
exclude-paths: external-lib
|
||||
report-folder: scan-build-report
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<markBuildUnstableWhenThresholdIsExceeded>false</markBuildUnstableWhenThresholdIsExceeded>
|
||||
<bugThreshold>0</bugThreshold>
|
||||
<clangexcludedpaths/>
|
||||
<reportFolderName>clangScanBuildReports</reportFolderName>
|
||||
</jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher>
|
||||
</publishers>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue