-
Bug
-
Resolution: Fixed
-
Major
-
None
I've created a GroovyParser but when using it, I get the following exception:
java.lang.AssertionError: Static analysis tool [...] cannot scan console log output, please define a file pattern at edu.hm.hafner.util.Ensure.throwException(Ensure.java:161) at edu.hm.hafner.util.Ensure.access$000(Ensure.java:35) at edu.hm.hafner.util.Ensure$BooleanCondition.isTrue(Ensure.java:715) at io.jenkins.plugins.analysis.core.model.ReportScanningTool.scanInConsoleLog(ReportScanningTool.java:141) at io.jenkins.plugins.analysis.core.model.ReportScanningTool.scan(ReportScanningTool.java:100) at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:64) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.scanWithTool(IssuesRecorder.java:688) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:656) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:628) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Parser script:
import edu.hm.hafner.analysis.Severity return builder .setFileName('Jenkinsfile') .guessSeverity(matcher.group(1)) .setMessage(matcher.group(2)) .setOrigin(matcher.group(3) + '/' + matcher.group(4)) .buildOptional()
RegEx:
[(INFO|WARNING|ERROR)] (.) (([^ )])\/([^ )]*))$
Sample:
12:38:11 [WARNING] Any message (libraryA/stepB)
- duplicates
-
JENKINS-54832 Groovy Parser cannot access console log
- Resolved