It is useful to know the name of the scheduler that initiated a build request, i.e., to conditionally FileUpload? the results of a Nightly scheduled build.
The patch I'm attaching passes the Scheduler along the BuildRequest? chain so that Build can setProperty("scheduler", self.scheduler.name) in Build.setupStatus().
It can then be used like this:
class CustomFileUpload(FileUpload):
def start(self):
scheduler = self.build.getProperty("scheduler")
if scheduler == "nightly":
FileUpload.start(self)
else:
self.step_status.setColor("green")
self.step_status.setText(["upload", "skipped"])
self.addCompleteLog("log", "skipped upload (not a nightly build, scheduler '%s')\n" % scheduler)
return SKIPPED