[Buildbot-devel] Problem with Using MailNotifier

Fulvio Cervone fcervone at me.com
Thu May 12 05:08:16 UTC 2011


Check the log file in the master directory; if there is a problem you will see it there printed out in the logs.

Usually you will see something like an exception, if the problem is on the mail notifier, and most of the times you can get the error just looking at the line that the log is pointing out.

Can you trigger the mail notifier and then post the log entry? That would help to figure out what is going wrong (and believe me , with the mail notifier many things could go wrong).

-f


On May 11, 2011, at 9:39 PM, Nikunj Badjatya wrote:

> Dear Members,
> 
> I have recently started to use Buildbot for my C library build purpose.
> I am using "MailNotifier" for triggering automatic mails at various stages of the build.
> 
> Buildbot version: 0.7.12
> Twisted version: 9.0.0
> Python version 2.6.6
> CentOS 5.6
> 
> Q.1)
> The following code snippet is failing to send a mail. 
> {{{
> from buildbot.status.mail import MailNotifier
> from buildbot.status.builder import Results
> def messageformatter(mode, name, build, results, master_status):
>  result = Results[results]
> 
>  text = list()
>  text.append('Testing Mail Trigger..cooperate')
>  text.append("name of builder:"% name)
>  text.append("URL            :"% master_status.getURLForThing(build))
>  text.append("slavename      :"% build.getSlavename())
>  text.append("STATUS         : %s" % result.title())
>  return {
>          'body' : "\n".join(text),
>          'type' : 'plain'
>  }
> 
> mn = MailNotifier(fromaddr="buildmaster at localhost",
>                            sendToInterestedUsers=False,
>                            subject='Testing Buildbot Mail Trigger',
>                            mode='all',
>                            extraRecipients=['abc at xxx.com'],
>                            messageFormatter=messageformatter)
> ...
> ...
> c['status'].append(mn)
> 
> }}}
> 
> But when I simply use:
> {{{
> 
> ml = MailNotifier(fromaddr="buildmaster at localhost",
>                   sendToInterestedUsers=False,
>                   subject='Testing Buildbot Mail Trigger',
>                   extraRecipients=['abc at xyz.com'],
>                   )
> ...
> ...
> c['status'].append(ml)
> 
> }}}
> 
> It could send a mail. !
> 
> Q.2)
> Is it possible to trigger a mail just before sometime ( say 1 hr ) the build process starts.?? Please guide as to how it can be accomplished.!
> 
> 
> 
> Please help to solve these .!
> 
> 
> Thanks,
> 
> Nikunj
> Bangalore, India
> 
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay_______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20110511/fc7b69b3/attachment.html>


More information about the devel mailing list