[Buildbot-devel] messageFormatter to grab logs from the waterfall page, and how to add on the waterfall page a link to a zip file on the slave.

Dan Kegel dank at kegel.com
Tue Feb 12 06:08:42 UTC 2013


One of these days I'd like to add a section to the buildbot tutorial
showing how to do this.

On Mon, Feb 11, 2013 at 8:39 PM, shiny knight <theshinyknight at me.com> wrote:
> Terrific, that's really useful
>
> Thanks a lot for sharing your approach!
>
>
> On Feb 11, 2013, at 9:08 AM, Dan Kegel wrote:
>
>> On Sun, Feb 10, 2013 at 11:42 PM, shiny knight <theshinyknight at me.com> wrote:
>>> It sounds similar to what I want to do....All that I need is to tell the buildbot to show a link on a specific step, but so far I was not successful...that's why I was thinking that maybe there was a correct way to do so in the buildbot.
>>>
>>> After all I could always put a link to a regular html page with the links to download the library; but was nicer to have the link right in the step that build the library.
>>
>> Right, that's what I do.
>>
>>> What syntax did you used to put the link to the upload dir ?
>>
>> Here it is again, with a little more (ugly) detail.  I save all the
>> build artifacts under a
>> subdirectory named for the builder and build number, like this:
>>
>> class LinkedShellCommand(ShellCommand):
>>    """A shell command that adds a URL to the build resuilts."""
>>    def __init__(self,**kwargs):
>>         ShellCommand.__init__(self,**kwargs)
>>
>>    def createSummary(self,log):
>>         # FIXME: make this configurable
>>         rooturl = "http://buildhost3/repobot"
>>         buildername = self.getProperty("buildername")
>>         buildnumber = self.getProperty("buildnumber")
>>         artifact_url = "%s/builds/%s/%d/" % (rooturl, buildername, buildnumber)
>>         self.addURL("artifacts", artifact_url)
>>
>> ...
>>    factory.addStep(ShellCommand(command=['/bin/sh', '-c',
>> WithProperties('echo %s/%s | tee ../bs-artifactsubdir', 'buildername',
>> 'buildnumber')], description="Save build ID"))
>> ...
>>    factory.addStep(LinkedShellCommand(command=["upload.sh"])
>>
>> where upload.sh is a script that does something like
>>    root_of_all_evil=/home/buildbot/var/repobot
>>    bs_upload_user=buildbot
>>    bs_upload_host=buildshot3
>>    bs_artifactsubdir=`cat ../bs-artifactsubdir`
>>    builds_dest=$root_of_all_evil/builds/$bs_artifactsubdir
>>    ssh -o StrictHostKeyChecking=no $bs_upload_user@$bs_upload_host
>> "rm -rf $builds_dest; mkdir -p $builds_dest"
>>    scp -o StrictHostKeyChecking=no -p *.deb
>> $bs_upload_user@${bs_upload_host}:$builds_dest
>>
>> and, on buildhost3, /var/www/repobot is a symlink to /home/buildbot/var/repobot,
>> and apache is configured to expose /var/www as http://buildhost3.
>>
>> Does that cover it?
>> - Dan
>>
>> ------------------------------------------------------------------------------
>> Free Next-Gen Firewall Hardware Offer
>> Buy your Sophos next-gen firewall before the end March 2013
>> and get the hardware for free! Learn more.
>> http://p.sf.net/sfu/sophos-d2d-feb
>> _______________________________________________
>> Buildbot-devel mailing list
>> Buildbot-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>




More information about the devel mailing list