Writing my first custom class for Buildbot.
I am subclassing ShellCommand; the class will have to - Run scripts (written in shell script or Python) - Be able to retrieve logs and parse them - retrieve data from the builders and change sources, to populate reports.
So far I made a basic one that is able to run a script; but I am facing 2 big issues:
1) When I run many steps; I am not sure how do I differentiate among them in the mail notifier function. If I have 5 steps and the 3rd fail; the example that is on the Buildbot site will grab only the last commit logs, not the one that fail; and I am not sure how you actually grab a specific log from a specific step. The docs won't help at all, but I am sure that there is a way to say in the mail notifier function
"grab this log called 'errors' from the step called 'unit test' "
Altho I have no clue how to do that. I imagine that the same should work if I try to get these info from my custom class, and not only in the mail notifier.
2) I want to get info about what I build, to generate reports and eventually mail. The issue is that I have no idea how to get data. From my class, ideally I would grab things like revision for a specific project; person that did the commit, time of the commit; builder and so on. So far I have found nothing that tell me how to get these values.
I am experimenting with the buildbot.status.builder Results; but I have no clue if that is the right class to look at; I just wish that there was something simple to call; that would return info, but the manual is more interested in explaining how to set up a buildbot; with all the features that are already in their class; instead than also pointing you at how to do your own (the customization section is quite short and has no real description of cases like mine).
Any help or example would be more than appreciated; so far I have found nothing relevant on Google, except few classes that require me weeks just to decipher what is going on there. Thanks