Search code examples
jenkinsloggingjenkins-pipelinejenkins-plugins

Jenkins Log Parser


I was using https://plugins.jenkins.io/log-parser/ plugin with freestyle Jenkins Jobs. But since moving to Jenkins Pipeline, I have not been able to integrate the log parser into the Declaratinve Pipeline syntax.

How can this be done? I also didn't find info in their docs. Also, what would be a good log parsing rule and where to specify it? In the Jenkinsfile also? Could you give an example? Thanks.


Solution

  • I don't user log-parser, but a quick glance at the issues suggests it is not presently compatible;

    JENKINS-27208: Make Log Parser Plugin compatible with Workflow

    JENKINS-32866: Log Parser Plugin does not parse Pipeline console outputs

    Update:
    This old response by Jesse Glick (Cloudbees; Jenkins sponsor) to similar question suggests it does in fact work now and suggests how to generate syntax, but OP complains DSL and documentation is weak.

    gdemengin wrote pipeline-logparser to work around another issue JENKINS-54304

    Build Failure Analyzer may also be of use to you. YMMV