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

Running plugin by class call in Declarative pipeline


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • jenkinsci/blue-ocean image (latest)
      Ubuntu 18.04
      cppncss-plugin: 1.2
      cppcheck-plugin: 1.24


      For plugins which don't have Pipeline integration, and for which I'd like to call their publisher class manually using a "step([$class: '........']) call, how do I find:

      • The name of the class to use (e.g. CppNCSSPublisher)
      • The names of parameters to use
      • Which ones are required/options

      Or is there a better way to integrate these publishers?


      I'm using the BlueOcean container with Declarative pipelines. I'm also running some code quality tools that I've used in the past on non-pipeline Jenkins jobs (namely cppcheck and lizard, which dumps cppncss-formatted XML).

      Lots and lots of reporting plugins don't yet work in Pipelines. Specifically, CppNCSS-plugin.

      To run this plugin from the pipeline, in my "post" section I'm trying to call the class manually as a "step()" call, but it keeps crashing. I'm having a very hard time finding useful documentation to explain how to do this, or if there's another way.

      My current command attempt:

      • step([$class: 'hudson.plugins.cppncss.CppNCSSPublisher', reportFilenamePattern: 'lizard.xml'])

      Crashes with a "cannot instantiate" Java dump.

            marcosteffan Marco Steffan
            lacelle Zachary LaCelle
            1 Vote for this issue
            2 Start watching this issue