[Buildbot-devel] how do I put the build failure output in the email notification?

Kevin Funk kevin.funk at kdab.com
Thu Apr 23 11:49:40 UTC 2015


On Wednesday, April 22, 2015 18:40:01 zhuang liang wrote:
> looks like it should be "for log in logs" instead of "for log in
> reversed(logs)"

Why don't you just use this parameter of MailNotifier?

addLogs
(boolean). If True, include all build logs as attachments to the messages. 
These can be quite large. This can also be set to a list of log names, to send 
a subset of the logs. Defaults to False.

Works for me.

Greets,
Kevin

> > On Apr 22, 2015, at 18:28, zhuang liang <lysisius at gmail.com> wrote:
> > 
> > Hi Francesco,
> > 
> > Thanks for pointing this out. I tried out the sample but it didn't do
> > exactly what it claimed. The log that it includes is not the last, but
> > the first, which is not quite useful if the failed step is not the first.
> > 
> > Any insight on what could be wrong in the sample config?
> > I'm guessing in this part:
> > """
> > 
> >         # get log for last step
> >         logs = build.getLogs()
> >         # logs within a step are in reverse order. Search back until we
> >         find stdio
> >         
> >         for log in reversed(logs):
> >             if log.getName() == 'stdio':
> >                 break
> >         
> >         name = "%s.%s" % (log.getStep().getName(), log.getName())
> >         status, dummy = log.getStep().getResults()
> > 
> > """
> > -Strong
> > 
> >> On Apr 22, 2015, at 09:54, Francesco Di Mizio <francescodimizio at gmail.com
> >> <mailto:francescodimizio at gmail.com>> wrote:
> >> 
> >> Hi,
> >> 
> >> if you check the documentation there's an example where part of the log
> >> gets attached to the email.
> >> 
> >> http://docs.buildbot.net/latest/manual/cfg-statustargets.html
> >> <http://docs.buildbot.net/latest/manual/cfg-statustargets.html>
> >> 
> >> Search for html_message_formatter
> >> 
> >> On Wed, Apr 22, 2015 at 6:36 PM, zhuang liang <lysisius at gmail.com
> >> <mailto:lysisius at gmail.com>> wrote: Hi,
> >> 
> >> Right now I have email notification on build failure, but it doesn't show
> >> me what the failure is, just at what step. I'm wondering how I can put
> >> the stderr in the email too.
> >> 
> >> -Strong
> >> -------------------------------------------------------------------------
> >> ----- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> >> Develop your own process in accordance with the BPMN 2 standard
> >> Learn Process modeling best practices with Bonita BPM through live
> >> exercises
> >> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-> >> <http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual->
> >> event?utm_
> >> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> >> _______________________________________________
> >> Buildbot-devel mailing list
> >> Buildbot-devel at lists.sourceforge.net
> >> <mailto:Buildbot-devel at lists.sourceforge.net>
> >> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
> >> <https://lists.sourceforge.net/lists/listinfo/buildbot-devel>

-- 
Kevin Funk | kevin.funk at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7021 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20150423/afe3f200/attachment.bin>


More information about the devel mailing list