[users at bb.net] How to addHTMLLog() from remote slave?

Steve Hoelzer shoelzer at gmail.com
Thu Jul 13 22:29:15 UTC 2017


I'm running Buildbot 0.8.12 and I have a custom build step based on
ShellCommand that generates a HTML report. I figured out how to read
the report and store/link to it using addHTMLLog(). But then I
discovered that my code only works if master and slave are on the same
machine.

I've been reading about remote commands, LogObserver, and the logfiles
parameter but can't figure what I should be doing. Here's my current
code:

    def finished(self, results):
        file = os.path.join(self.getProperty('builddir'), self.testReportFile)
        if os.path.exists(file):
            with open(file, 'r') as f:
                content = f.read()
        else:
            content = 'Could not find file "%s"' % file
        self.addHTMLLog("test report", content)
        ShellCommand.finished(self, results)

Like I said, this works when master and slave are on the same machine
(shared file system). What should I do to make it work for any slave?

Thanks,
Steve


More information about the users mailing list