BuildReactor icon indicating copy to clipboard operation
BuildReactor copied to clipboard

New feature: Play sound on build start, success and failure

Open trreeves opened this issue 8 years ago • 6 comments

It would be great if BuildReactor could play a sound when events occur.

SirenOfShame has a fairly expressive rule system for configuring what happens when different build events occur. Something similar would be great of course, but initially just an option to play sound for the start, success or failure of a build would be so useful, and with just an option to enable/disable sound for each build (the sounds needn't be configurable to start with, just something sensible).

This would then make BuildReactor useful as a build monitor for the whole team, displayed in a prominent position in the office, connected to some speakers.

trreeves avatar Jan 27 '16 11:01 trreeves

@AdamNowotny I have implemented this on a branch, and have been using it in the office for a few weeks to great effect. Needs a little tidy up and some test coverage, but would you be interested in considering this if I submit a PR?

trreeves avatar Oct 07 '16 09:10 trreeves

That would be ace! How would be setup, globally or per service? For configuration it should be fairly easy to set URLs to the sounds for each type of event.

AdamNowotny avatar Oct 07 '16 10:10 AdamNowotny

I have currently got it so that the configuration is specified globally. I think typically you'll want to configure sounds for all or a sub set of builds, rather than individual ones, so makes sense to not have to go into each build and perform the configuration there.

My v1, was going to be:

  1. Event sounds for build started, completed, failed.
  2. Fixed sensible choices for the actual sounds, so that it just works out of the box, no extra config needed, & no potential network connectivity/security issues (when running inside firewalls etc.)
  3. turn all event sounds on/off for all builds
  4. turn on/off sounds for started, completed & failed events individually, for all builds.

I've currently done 1,2,3, with some test coverage still to add. UI currently looks like this: https://drive.google.com/open?id=0ByNlFBXnsJ_KV3VpUlVQejhMbEE

Let me know any thoughts

Cheers.

trreeves avatar Oct 14 '16 16:10 trreeves

Global config should be enough and it's simpler so all good. It would be good to add sound on fixed build although happy to do that once you merge. Customizing the sounds seems to me like something that most teams would like to do however if someone needs it pull requests welcome :) The screenshot looks great.

AdamNowotny avatar Oct 19 '16 11:10 AdamNowotny

Aah, when I wrote 'completed build', I mean 'fixed' - it seems they're the same thing in BR right?

Yeah, I agree a lot of people will want to customize the sounds - I was thinking to add that in the next iteration. I was (selfishly) trying to build the minimum that would be useful to my team, to get it working as soon as possible, then add to it over time.

Anyway, when I get time to get the PR together (hopefully soon), you can choose when you're happy with it :-) I'm using my branch in developer mode quite happily in the meantime.

trreeves avatar Oct 19 '16 15:10 trreeves

Am I right in assuming this PR never saw the light of day? 'tis a shame because this feature would be really useful.

chadlwilson avatar Oct 29 '19 14:10 chadlwilson