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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Minor Minor
    • 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

            drulli Ulli Hafner
            jmini Jeremie Bresson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: