[Buildbot-devel] Transfering files inside a build step

Daniel Eggert deggert at apple.com
Fri Jan 15 23:25:22 UTC 2010


On Jan 15, 2010, at 3:22 PM, Andrew Melo wrote:

> On Fri, Jan 15, 2010 at 5:17 PM, Daniel Eggert <deggert at apple.com> wrote:
>> I need to transfer files inside a build step.
>> 
>> My build step might generate crash logs (on the slave). I parse the stdio log for the paths to those logs, but how do I dynamically move them to the master?
>> 
>> I have
>> 
>> def createSummary(self, log):
>>        ShellCommand.createSummary(self, log)
>>        crashIndex = 0
>>        for crashLogPath in self.crashLogs:
>>                text = None
>>                try:
>>                        with open(crashLogPath, 'r') as f:
>>                                text = f.read()
>>                except:
>>                        pass
>>                if text is not None:
>>                        crashIndex += 1
>>                        name = "Crash"
>>                        if (crashIndex > 1):
>>                                name = "Crash {0}".format(crashIndex)
>>                        self.addCompleteLog(name, text)
>> 
>> 
>> but the paths inside self.crashLogs are paths on the slave.
>> 
> 
> Try inheriting from the class described at:
> http://djmitche.github.com/buildbot/docs/0.7.11/#Transferring-Files


My build step inherits from ShellCommand and runs a custom binary on the slave. But that binary can create various logs. I don't see how I can use FileUpload in this case. Maybe I'm missing something?

/Daniel





More information about the devel mailing list