Since this is more related to a script extending a plugin, I am posting to 
developers forum.

I am trying to write a Puppet-Error-Parser script using Compiler warnings, 
here is what i have done
in global configuraiton 

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 '}'

Everything seems to be working just fine here.
For my build, i enabled the compiler warning for " Puppet-Error-Parser" But 
 it does't detect any error though console log has error :(

Where am i going wrong? :( can anyone help?

Thanks,
M



-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to