• Add menu for location: Primary Menu
Jenkins

How to attach the jenkins build log as part of the email body?

Rajesh Kumar September 11, 2015 comments off
jenkins-build-log-as-part-of-the-email-body

jenkins-build-log-as-part-of-the-email-body

Way 1 – 

Put following lines as part of Default Content text box

${BUILD_LOG, maxLines=9999, escapeHtml=false}

this works for free style projects

Way 2 – If you want send only specific line using regex

${BUILD_LOG_REGEX, regex=”\\b(Buildfile|BUILD)\\b”, linesAfter=1}

${BUILD_LOG_REGEX, regex=”^.*?BUILD FAILED.*?$”, linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true}

${BUILD_LOG_REGEX, regex=”\\b(FC0)\\b”, linesAfter=1}

${BUILD_LOG_REGEX, regex=”^.*?BUILD FAILED.*?$”, linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true}

${BUILD_LOG_REGEX, regex=”^.*?FC0.*?$”, maxMatches=95, showTruncatedLines=false, escapeHtml=false, matchedLineHtmlStyle=true}

This will show exactly which is expected lines as part of the regEx.

More Info

http://wiki.hudson-ci.org/display/HUDSON/Email-ext+plugin

http://stackoverflow.com/questions/9439450/how-will-i-filter-out-only-errors-in-jenkins-email-ext-build-log-regex

http://champasoft.blogspot.nl/2012/11/jenkins-pattern-for-e-mailing-log.html

Attach Build email Email body Guide How How to attach jenkins build log Jenkins Jenkins build log Jenkins build log in email body Log Part Process Steps Tutorials Ways

Recent Posts

  • AWS Best Practices for DDoS Resiliency
  • Protected: Rajesh Kumar Supported Tools & Cost Table – 2021
  • How to setup Datadog APM for Java application running with Tomcat
  • How to enable Apache Tomcat monitoring in Datadog Agent?
  • How to install datadog agent in centos
  • How to enable Docker Container monitoring in Datadog Agent?
  • How to enable Live Process monitoring in Datadog Agent?
  • Datadog Agent Setup in Windows Step by Step Guide
  • Self-hosted Alternative for gist, apple notes, onenote, Google keep & evernote
  • List of Free and Open Source Maps and Global Positioning System (GPS)

Categories

Archives

DevOps | Agile & SRE

Address

Cospaze, BVR Lake Front Veerannapalya Main Road,Nagawara, Bangalore 560045

  • +91 700 483 5930
  • contact@devopsschool.com
  • www.devopsschool.com

Community

  • Google Groups 1
  • Google Groups 2
  • Linkedin Groups 1
  • Facebook Group 1
  • Facebook Group 2

Useful Reference

  • DevOps Community
  • https://www.devopsschool.com/blog/sitemap/
  • DevOps Trainer
  • DevOps Consulting
  • DevOps News & Events

Links

  • About Us
  • Support
  • Calender
  • Comparison
  • Agenda
© 2021 DevOpsSchool.com - Theme by DevOpsschool