User:Bhearsum/Buildbot/Custom Steps
Jump to navigation
Jump to search
These are used to clobber a tree every 10 builds. (TODO: Make it possible to clobber every Nth builds):
class MozillaMaybeClobber(ShellCommand):
name = "maybe clobber"
warnOnFailure = True
description = ["clobbering"]
descriptionDone = ["did not clobber"]
command = ["true"]
workdir = "."
def start(self):
buildNum = self.step_status.getBuild().getNumber()
if (buildNum % 10) == 0:
self.command = ["rm", "-rf", "mozilla"]
self.descriptionDone = ["clobbered"]
ShellCommand.start(self)
class MozillaMaybeClobberWin32(ShellCommand):
name = "maybe clobber"
warnOnFailure = True
description = ["clobbering"]
descriptionDone = ["did not clobber"]
command = ["true"]
workdir = "."
def start(self):
buildNum = self.step_status.getBuild().getNumber()
if (buildNum % 10) == 0:
self.command = ["rmdir", "/s", "/q", "mozilla"]
self.descriptionDone = ["clobbered"]
ShellCommand.start(self)