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

Custom compiler warning for error parsing is not detecting the errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • warnings-plugin
    • Ubuntu Linux

      Regular expression is unable to figure out error pattern.
      This bug is in follow up of thread : https://groups.google.com/forum/#!topic/jenkinsci-users/uWI6SU9GVQg

      Global configuration

      Name: Puppet-Error-Parser
      Link name: Puppet-Error-Parser
      Tredn report name : Puppet Error Trend
      Regular Expression: ^.*(err:) (.*)at(.*\.pp):(\d+)$
      

      Mapping script:

      import hudson.plugins.warnings.parser.Warning
      
      String category = matcher.group(1)
      String message = matcher.group(2)
      String fileName = matcher.group(3)
      String lineNumber = matcher.group(4)
      
      
      return new Warning(fileName, Integer.parseInt(lineNumber), "Dynamic Parser", category, message);
      

      Example Log Message:

      19:35:11 err: Could not parse for environment production: Syntax error at '{'; expected '}' at /home/build/jenkins/workspace/puppet-parser-try/modules/profile/manifests/mongodb/abc/shard/master.pp:5
      

      output of regular expression matching
      One warning found
      file name: /home/build/jenkin[...]ongodb/abc/shard/master.pp
      line number: 5
      priority: Normal Priority
      category: err:
      type: Dynamic Parser
      message: Could not parse for [...]apos;; expected '}'

        1. aggregated-warnings.xml
          0.1 kB
        2. aggregated-warnings.xml
          0.1 kB
        3. changelog.xml
          0.0 kB
        4. changelog.xml
          0.0 kB
        5. console-log.txt
          35 kB
        6. console-log.txt
          35 kB
        7. hudson.plugins.warnings.WarningsPublisher.xml
          3 kB
        8. log
          260 kB
        9. log
          260 kB
        10. PuppetErrorParser-warnings.xml
          0.1 kB
        11. puppet-parser-global-configuration.JPG
          puppet-parser-global-configuration.JPG
          119 kB
        12. regexp.txt
          0.0 kB

            drulli Ulli Hafner
            maneeshmp Maneesh M P
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: