With "Warnings Plugin Native Format" tool, the expected input xml is not consistent with the exported xml

XMLWordPrintable

    • Type: Bug
    • Resolution: Incomplete
    • Priority: Minor
    • Component/s: warnings-ng-plugin
    • None

      Introduced with JENKINS-56510, when selecting "Warnings Plugin Native Format" as "Tool" the "Warning NG Plugins" should import an xml exported by the API:

      <jenkins server>/job/<job name>/<build nr>/<tool id>/all/api/xml
      

      The problem is that this API exports the report of issues as:

      <reportApi _class="io.jenkins.plugins.analysis.core.restapi.ReportApi">
         <issue>
            <!-- .. -->
         </issue>
         <issue>
            <!-- .. -->
         </issue>
         <size>2</size>
      </reportApi>
      

      And the plugin expect "report/issue" as xmlIssueRoot (sort of x-path query) to find the issues.

      In other words this can be imported:

      <report _class="io.jenkins.plugins.analysis.core.restapi.ReportApi">
         <issue>
            <!-- .. -->
         </issue>
         <issue>
            <!-- .. -->
         </issue>
         <size>2</size>
      </report>
      

      The issue is that the root element is called reportApi in the exported xml and report is expected for the import

      Tested with version 5.1.0

            Assignee:
            Ulli Hafner
            Reporter:
            Jeremie Bresson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: