Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35096

Add support for Jenkins Pipeline to the cppcheck-plugin

      Add support for Jenkins Pipeline with Cppcheck Plugin
      https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md

          [JENKINS-35096] Add support for Jenkins Pipeline to the cppcheck-plugin

          Hello Marco,

          I created a pull-request for this issue, with a complete operational pipeline implementation for this plugin.

          Internally we are already using it successfully, See https://github.com/jenkinsci/cppcheck-plugin/pull/37

          Altran Manatree added a comment - Hello Marco, I created a pull-request for this issue, with a complete operational pipeline implementation for this plugin. Internally we are already using it successfully, See  https://github.com/jenkinsci/cppcheck-plugin/pull/37

          Kasia Gauza added a comment - - edited

          I've merged AltranManatree:jenkins-35096_Altran_cppcheck_plugin_pipeline_support with master branch, uploaded the plugin and it works with the pipeline.

          One issue left is that main Cppcheck link is not accessible. An error occurs:

          org.apache.commons.jelly.JellyTagException: jar:file:/mnt/work/jenkins-home/plugins/cppcheck/WEB-INF/lib/cppcheck.jar!/org/jenkinsci/plugins/cppcheck/CppcheckProjectAction/nodata.jelly:4:64: <st:include> No page found 'sidepanel.jelly' for class org.jenkinsci.plugins.cppcheck.CppcheckProjectAction

          Also pipeline syntax snippet generator allows to choose step: general build step - publish cppcheck results but result always looks bad:

          step <object of type org.jenkinsci.plugins.cppcheck.CppcheckPublisher>

           

          cppcheck sidepnael error.png

           

           

          Kasia Gauza added a comment - - edited I've merged AltranManatree : jenkins-35096_Altran_cppcheck_plugin_pipeline_support with master branch, uploaded the plugin and it works with the pipeline. One issue left is that main Cppcheck link is not accessible. An error occurs: org.apache.commons.jelly.JellyTagException: jar: file:/mnt/work/jenkins-home/plugins/cppcheck/WEB-INF/lib/cppcheck.jar!/org/jenkinsci/plugins/cppcheck/CppcheckProjectAction/nodata.jelly:4:64: <st:include> No page found 'sidepanel.jelly' for class org.jenkinsci.plugins.cppcheck.CppcheckProjectAction Also  pipeline syntax snippet generator  allows to choose  step: general build step - publish cppcheck results but result always looks bad: step <object of type org.jenkinsci.plugins.cppcheck.CppcheckPublisher>   cppcheck sidepnael error.png    

          I seem to have a working version.

          Still got a few wrinkles when using the step generator; the defaults are not displayed.

          Michael Doubez added a comment - I seem to have a working version. Still got a few wrinkles when using the step generator; the defaults are not displayed.

          Michael Doubez added a comment - Fixed: https://github.com/jenkinsci/cppcheck-plugin/pull/39  

          Kasia Gauza added a comment -

          So is there a working version or it's still in progress?

          Kasia Gauza added a comment - So is there a working version or it's still in progress?

          Ma Ko added a comment - - edited

          Why is this issue resolved and listed as Release 1.22? Still can't use it?

          Ma Ko added a comment - - edited Why is this issue resolved and listed as Release 1.22? Still can't use it?

          Kasia Gauza added a comment - - edited

          It is also behaving faulty on my Jenkins instace. Update gave me several hours of troubleshooting/rebuilding cppcheck to 1.21, reuploading and so on. I have Jenkins ver. 2.73.3.

          Error:
          org.apache.commons.jelly.JellyTagException: jar:file:(...)/jenkins-home/plugins/cppcheck/WEB-INF/lib/classes.jar!/org/jenkinsci/plugins/cppcheck/CppcheckResult/index.jelly:3:62: <st:include> No page found 'sidepanel.jelly' for class org.jenkinsci.plugins.cppcheck.CppcheckResult

          Kasia Gauza added a comment - - edited It is also behaving faulty on my Jenkins instace. Update gave me several hours of troubleshooting/rebuilding cppcheck to 1.21, reuploading and so on. I have Jenkins ver. 2.73.3. Error: org.apache.commons.jelly.JellyTagException: jar: file:(...)/jenkins-home/plugins/cppcheck/WEB-INF/lib/classes.jar!/org/jenkinsci/plugins/cppcheck/CppcheckResult/index.jelly:3:62: <st:include> No page found 'sidepanel.jelly' for class org.jenkinsci.plugins.cppcheck.CppcheckResult

          Daan Timmer added a comment -

          Am on version 1.22

          Using the example provided above but it keeps trying to read a file called `**/cppcheck-result.xml`

          Any way to solve this? Or will this be fixed in a future version?

          Daan Timmer added a comment - Am on version 1.22 Using the example provided above but it keeps trying to read a file called `**/cppcheck-result.xml` Any way to solve this? Or will this be fixed in a future version?

          I have the same problem as daan_philips ...

          [Cppcheck] java.lang.IllegalArgumentException: No cppcheck test report file(s) were found with the pattern '**/cppcheck-result.xml'
          

          although I configured a different path in the pipeline syntax:

             step([$class: 'CppcheckPublisher',        pattern: 'Testing/cppcheck-report.xml',        ignoreBlankFiles: false, threshold: "0", ........
          

          Wolfgang Steiner added a comment - I have the same problem as daan_philips ... [Cppcheck] java.lang.IllegalArgumentException: No cppcheck test report file(s) were found with the pattern '**/cppcheck-result.xml' although I configured a different path in the pipeline syntax: step([$class: 'CppcheckPublisher' , pattern: 'Testing/cppcheck-report.xml' , ignoreBlankFiles: false , threshold: "0" , ........

          viet added a comment - - edited

          Hi marcosteffan , djviking ,

          When I add stage

          stage "cppcheck"
          step([$class: 'CppcheckPublisher',  to my jenkinfile

          it raises a warning and it seems to be the failure

          Maybe CppcheckPublisher doesn't have var member like displayInformationSeverity, xSize, ySize

          Could you help me to solve this issue?

          Thanks

          viet added a comment - - edited Hi marcosteffan , djviking , When I add stage stage "cppcheck" step([$class: 'CppcheckPublisher',   to my jenkinfile it raises a warning and it seems to be the failure Maybe CppcheckPublisher doesn't have var member like displayInformationSeverity, xSize, ySize Could you help me to solve this issue? Thanks

            marcosteffan Marco Steffan
            djviking Sverre Moe
            Votes:
            49 Vote for this issue
            Watchers:
            60 Start watching this issue

              Created:
              Updated:
              Resolved: