Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jenkins pipeline warnings graph

I started to migrate some jobs in jenkins to pipeline execution.

Is there any chance to see the warnings graph in multi branch pipeline jobs? Within my older projects I can configure the graphs with "Configure the trend graph" option. These option will crash in the pipeline syntax tool.

Is there any option to make the graph visible?

I have in my Jenkinsfile:

stage ('Warnings gcc') {
    step([$class: 'WarningsPublisher', canComputeNew: false, canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'GNU Make + GNU C Compiler (gcc)', pattern: 'error_and_warnings.txt']], unHealthy: ''])
}   

stage ('Warnings clang') {
    step([$class: 'WarningsPublisher', canComputeNew: false, canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'Clang (LLVM based)', pattern: 'error_and_warnings_clang.txt']], unHealthy: ''])
} 

The reports will be generated but no graph is displayed.

UPDATE: Now it still did not work but it is also impossible to use the snipped generator for the warnings plugin.

Entering a file name in the snipped generator for the warning plugin results in a java null pointer exception:

javax.servlet.ServletException: java.lang.NullPointerException
  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
  at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:236)
  at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
  at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:362)
  some more lines follows ...

Mentioned in the revision log for the warnings plugin V 4.56:

Fixed deactivation of trend graphs (using the analysis collector plug-in)

But I use 4.57 and it still did not display any graph!

I posted the problem also to jenkins user list (no feedback for weeks) and also added bug report and bug report

Can anyone reproduce the problem or is the multi-branch pipeline simply still broken at all? Seems to be that there are not so much users for this plugin...

like image 798
Klaus Avatar asked Sep 12 '16 13:09

Klaus


People also ask

What is significance of warning Next Gen plugin and why we use it?

The Jenkins Next Generation Warnings plugin collects compiler warnings or issues reported by static analysis tools and visualizes the results. It has built-in support for more than hundred report formats. Among the problems it can detect: errors from your compiler (C, C#, Java, etc.)

How do I turn off Jenkins warnings?

As with any other administrative monitor, you can deactivate it and avoid showing every security warning detected. To do that, go to Jenkins Manage Jenkins Configure System Administrative monitors configuration. Click on the Administrative monitors button and clear the Security Warnings Monitor check box.

What are the 3 types of pipelines in Jenkins?

Declarative versus Scripted Pipeline syntax Declarative and Scripted Pipelines are constructed fundamentally differently. Declarative Pipeline is a more recent feature of Jenkins Pipeline which: provides richer syntactical features over Scripted Pipeline syntax, and.


1 Answers

These issues have been resolved with the latest versions of both Jenkins, the pipelines plugin[s], and the plugins you have mentioned above.

Additionally, the bugs you specifically reported have been resolved:

  1. [FIXED JENKINS-39553] Make GitHub plugin BuildableItem aware (#153)
  2. [FIXED JENKINS-39532] Do not access the workspace for pipelines

Update your Jenkins instance and all of your plugins (some of them have interdependencies on others) and after the suggested restart you should be able to display the graph successfully.

like image 91
lax1089 Avatar answered Sep 28 '22 13:09

lax1089