[Buildbot-devel] "master hostname" property for a buildStep?

john gale john at smadness.com
Thu Jan 10 22:48:12 UTC 2008


Is there a "master hostname" property for a buildStep?

For instance, we want to publish on the buildbot master's main webpage  
(:80) the latest installer tarball.  We succeed in creating the  
tarball, using FileUpload to transfer it, and even stick it in the  
right location.  We then want to create a record for this "latest  
installer tarball" which will be an HTTP path to the master.  This  
will be checked in to another svn repo which then other testslaves and  
other automated processes can check out.

The trouble is finding the master hostname automatically.  It doesn't  
look like it's a default property that we can stick into the buildstep.

f_build1.addStep(TarBuildResults())
f_build1.addStep(UploadBuildResults, slavesrc="buildresults.tar.gz",  
masterdest=None, mode=0775)
f_build1.addStep(CheckoutBuildArchive())
f_build1.addStep(UpdateTOTPath())
f_build1.addStep(CommitBuildArchive())

class UpdateTOTPath(ShellCommand):
     def start(self):
         bname = self.getProperty("buildername")
         bnumber = self.getProperty("buildnumber")
         brevision = self.getProperty("got_revision")
         self.setCommand(["./echo.pl", "archive/%s.txt" % (bname),  
"http://<sample.com>/builds/build-%s-r%s-b%s.tgz" % (bname, brevision,  
bnumber)])
         ShellCommand.start(self)

I'd like it to be automatic because the master could be replicated on  
other hosts for other projects, so <sample.com> could change easily.

Failing a builbot property, is there a python call into the buildbot  
object we could make?  I'm searching now, but it's taking a bit...

thanks,

	~ john

=================
support the arts!
www.smadness.com

updated October 12, 2005






More information about the devel mailing list