[Buildbot-devel] How to use addURL() for buildbot.steps.shell.ShellCommand

Charles Lepple clepple at gmail.com
Wed Feb 3 01:05:48 UTC 2010

On Tue, Feb 2, 2010 at 7:49 PM, Rick Liu <rick.liu at mobidia.com> wrote:
> I'm trying to run the following command in master.cfg of buildbot:
> ========================================================================================================
> runEngineModuleTestStep = ShellCommand(description="Running Engine Module
> tests", descriptionDone="Ran Engine Module tests",
> command=["test_master.py"], workdir="MIC\\Engine\\Test\\ModuleTest")
> runEngineModuleTestStep.addURL("google", "http://google.ca")

As I understand it, addURL() is meant to be called from an subclassed
method of the buildstep at runtime, rather than at configuration time.

For instance, I use a variation of the following code:

class CopyTarball(shell.ShellCommand):
    description=['copying tarball']
    descriptionDone=['copied tarball']

    def createSummary(self, log):
        shell.ShellCommand.createSummary(self, log)
        if self.getProperty("tarball"):
            url = ...
            self.addURL("tarball", url)

In this case, the createSummary() function extracts the URL from the build log.

- Charles Lepple

More information about the devel mailing list