[JIRA] [clang-scanbuild-plugin] (JENKINS-32229) Latest version fails to find reports directory

3 views
Skip to first unread message

rgeddis@vulcanft.com (JIRA)

unread,
Dec 30, 2015, 12:48:02 PM12/30/15
to jenkinsc...@googlegroups.com
Ross Geddis created an issue
 
Jenkins / Bug JENKINS-32229
Latest version fails to find reports directory
Issue Type: Bug Bug
Assignee: Unassigned
Components: clang-scanbuild-plugin
Created: 30/Dec/15 5:47 PM
Environment: clang-scanbuild-plugin-1.7
Priority: Major Major
Reporter: Ross Geddis

After updating to the latest version of this plugin, there has been an issue with finding the clang scan build reports directory. The plugin is configured with:

  • Mark build as unstable when threshold is exceeded? == unset/false
  • Report folder == clangScanBuildReports (default value)

After a project, configured with the plugin has been build, the following exception is seen in the console

ERROR: Build step failed with exception
java.lang.NullPointerException
	at hudson.FilePath.isAbsolute(FilePath.java:271)
	at hudson.FilePath.resolvePathIfRelative(FilePath.java:256)
	at hudson.FilePath.<init>(FilePath.java:252)
	at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.perform(ClangScanBuildPublisher.java:119)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
	at hudson.model.Run.execute(Run.java:1763)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)

After some investigation into the source code, the configuration was changed to set Mark build as unstable when threshold is exceeded?== set/true (with all other values left as default), this configuration produced a successful result. The difference in behaviour with the configuration change indicates the issue is with the publisher config.jelly and its constructor, however I am not well versed enough in this area to explain why or suggest a fix.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

tom.ghyselinck@excentis.com (JIRA)

unread,
Jan 12, 2016, 3:19:07 AM1/12/16
to jenkinsc...@googlegroups.com
Tom Ghyselinck commented on Bug JENKINS-32229
 
Re: Latest version fails to find reports directory

Hi,

I think the issue is related to the missing reportFolderName when the Job configuration is not saved after updating form < 1.7 to 1.7.

It works for me when configuring and saving the Job.

Before saving:

  <publishers>
    <jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher plugin="clang-scanbuild-plugin@1.6">
      <bugThreshold>15</bugThreshold>
      <clangexcludedpaths></clangexcludedpaths>
      <markBuildUnstableWhenThresholdIsExceeded>true</markBuildUnstableWhenThresholdIsExceeded>
    </jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher>
  </publishers>

After saving:

  <publishers>
    <jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher plugin="clang-scanbuild-plugin@1.7">
      <bugThreshold>15</bugThreshold>
      <clangexcludedpaths></clangexcludedpaths>
      <reportFolderName>clangScanBuildReports</reportFolderName>
      <markBuildUnstableWhenThresholdIsExceeded>true</markBuildUnstableWhenThresholdIsExceeded>
    </jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher>
  </publishers>

Solution:
Probably there needs to be an upgrade path or backward compatible path in the Clang Scanbuild Plugin.

tom.ghyselinck@excentis.com (JIRA)

unread,
Jan 12, 2016, 3:20:01 AM1/12/16
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages