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

Example.complex.jenkinsfile is not up to date

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None

      The documentation contained within Example.complex.jenkinsfile appears to be out-of-date and contains examples that no longer work.

       

      For example, 

      {{ def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern: '**/target/checkstyle-result.xml'}}

      This example produces a warning in my pipeline, using Jenkins 2.319.2, Warnings NG plugin 9.11.0:
      WARNING: Unknown parameter(s) found for class type 'io.jenkins.plugins.analysis.core.steps.ScanForIssuesStep': pattern

      As such, "pattern" is ignored, and the tool attempts to scan the console log rather than the file pattern.

       

      Please update the documentation with valid examples.

       

      In the mean time, I would appreciate it if someone could provide with with a working example in the replies with how to provide "pattern", "id", and "name" arguments using the above syntax.

      I can obviously use the code spit out by the Snippet Generator, however this does not allow me to pass a dynamic tool name.

            drulli Ulli Hafner
            fschwartz Matthew Durand
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: