Ticket #227 (closed enhancement: fixed)

Opened 9 months ago

Last modified 8 months ago

New "scheduler" property in process.base.Build

Reported by: dossy Assigned to:
Priority: minor Milestone: 0.7.8
Component: buildprocess 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

scheduler-property-in-build-patch.txt (7.5 kB) - added by dossy on 04/03/08 17:27:24.
scheduler-property-in-build-patch.txt

Change History

04/03/08 17:27:24 changed by dossy

  • attachment scheduler-property-in-build-patch.txt added.

scheduler-property-in-build-patch.txt

04/03/08 17:30:32 changed by dossy

See also: #87 and #124.

04/03/08 19:59:51 changed by dustin

  • milestone changed from undecided to 0.7.8.

Looks good and passes tests. Attachment is committed to devel tree in #227:scheduler-property-in-build.patch, with some documentation in #227:scheduler-property-docs.patch.

Brian, I don't have TeX or inkscape installed, so I can't verify the correctness of the documentation, but it should be Close Enough.

05/26/08 16:52:33 changed by dustin

  • status changed from new to closed.
  • resolution set to fixed.

this is in brian's tree