Ticket #2312 (closed enhancement: worksforme)

Opened 12 months ago

Last modified 11 months ago

Add the build status to build properties

Reported by: krf Owned by:
Priority: major Milestone: 0.9.+
Version: 0.8.6p1 Keywords: mail
Cc:

Description

Scenario: We'd like to add the build status as a custom mail header.

For this to work (properly) we need a way to access the build status from 'WithProperties?' to pass it to MailNotifier?'s extraHeaders.

Change History

comment:1 Changed 11 months ago by dustin

  • Keywords mail added; status build property removed
  • Milestone changed from 0.8.+ to 0.9.+

I think that this is something where your custom mail notifier would be querying data from the data API.

comment:2 Changed 11 months ago by tom.prince

Which could be wrapped in a custom IRenderable.

comment:3 Changed 11 months ago by krf

Yep. That's what we did for now.

For other people interested in this, here's the code:

class BuildStatusRenderable(util.ComparableMixin):
    implements(interfaces.IRenderable)

    def getRenderingFor(self, props):
        build = props.getBuild()
        results = build.results
        return Results[results]

extraHeaders = {
    'X-Build-Status': BuildStatusRenderable()
}

Feel free to close this.

Thanks

comment:4 Changed 11 months ago by dustin

  • Status changed from new to closed
  • Resolution set to worksforme
Note: See TracTickets for help on using tickets.