This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      Using shared library, and declarative pipeline I build msbuild projects (c#, c++, fortran)

      Each of those builds produces a log file, in pattern project.name + architecture + ".build.log"

      Trying to add warnings-ng at the end of all builds, so I made a method and call it then. 

      def publishWarnings() {
          //has to define via full namespace due to existence of local msbuild class
          def issues = scanForIssues tool: [$class: 'io.jenkins.plugins.analysis.warnings.MsBuild', pattern: "*.build.log"]
          def reference = env.JOB_NAME.replace(env.BRANCH_NAME, "develop")
          publishIssues id: 'analyseWarnings',
              name: 'All ', //the  "Warnings" postfix will be added
              issues: [issues],
              //filters: [includePackage('io.jenkins.plugins.analysis.*')],
              referenceJobName: reference,
              unstableNewAll: 5
      }
      

       unfortunately it seems  not enough as I get:

      ID msbuild is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for C#
      

      not sure how to handle this further.

      java.lang.IllegalStateException: ID analyseWarnings is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for All 
      

            Assignee:
            Ulli Hafner
            Reporter:
            Jakub Pawlinski
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: