buildbot questions

Marko Käning MK-MacPorts at techno.ms
Tue Aug 2 12:58:41 PDT 2011


Here is my slightly adapted version:

---
     from buildbot.status.builder import Results
     def messageFormatter(mode, name, build, results, master_status):
         result = Results[results]
     
         text = list()
         text.append("STATUS: %s" % result.title())
         return {
             'body' : "\n".join(text),
             'type' : 'plain'
         }
     
     mn = MailNotifier(fromaddr="buildbot at build.macports.org",
                       mode='problem',
                       lookup="macports.org",
                       messageFormatter=messageFormatter)

     c['status'].append(mn)
---

Lookup is now on build.macports.org, i.e. the responsible port owner should be getting the corresponding short message.
I guess one would have to write a short python routine now to filter out the error message lines from the result object.
But the above should already work.

If this works out we could enhance the output with another formatter, like perhaps the one given in the manual:
---
     def html_message_formatter(mode, name, build, results, master_status):
         """Provide a customized message to BuildBot's MailNotifier.
---

To test this we'd need to know whether buildbot is a valid user at build.macports.org and the question is whether choosing "macports.org" as the value for parameter lookup is correct.

I figure one could test this all by simply committing it to SVN…
But I am afraid I shouldn't do this on my own and rather wait for review from William, Jeremy, and Joshua. 
:-)


More information about the macports-dev mailing list