Ticket #227 (closed enhancement: fixed)
New "scheduler" property in process.base.Build
| Reported by: | dossy | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.7.8 |
| Version: | Keywords: | scheduler, nightly | |
| Cc: |
Description
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
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/trac/chrome/site/header-text-transparent.png)
