Create notification hooks
Email/sms/etc hooks on step/deployment success/failure

Now that step templates make it easy to reuse scripts between projects, and the deployment process means you can put steps that run on failure or on success or both, I think this suggestion can be closed as “done”. There’s even a HipChat step template available to use right now:
http://library.octopusdeploy.com/#!/step-template/actiontemplate-hipchat-notify
I’ll close this since I don’t think we’ll do much else around this for the time being – that will free up some votes. Thanks all!
Thanks for this suggestion everyone! I’d like to get some input on how notifications should work.
Implementing a special notifications feature is tempting, but I think it could become a hugely complicated feature, especially when people want to only run notifications when deploying to certain environments, or only on failure, or to skip a notification just this once, etc..
I’d like to find a way to support this, without requiring months of dev work and support for lots of different endpoints.
Octopus 2.0 already allows you to add PowerShell script steps or Email steps that run at the start of a deployment (prior to package download), or at the end (whether the deployment succeeds, fails or always). Steps can be scoped to environments, values can be bound, and they can be skipped. It seems like integrating with the usual deployment process would be a great way to go.
Currently you could write a PowerShell step to perform any kind of notification:
- Ping a web service - Integrate with a REST API - Send an email - Send an SMS via an APIThe one hassle however is that you’d have to duplicate the same PowerShell script/email between every single project.
However, if we implemented this suggestion:
This would give you the ability to define a script to perform your notification, and then reuse that script in all your deployments.
Would this be a nice way to support notifications?
-
Eric Loveland commented
Webhooks would allow for more than just deployment notifications. We have a need to know when new projects are created and when new variables are added.
As @Brannon Jones, noted, webhooks can be very broad since it's up to the consumer to filter
-
scott mcfadden commented
A step template for notification in hipchat would rock!
-
Chris Camburn commented
I think Paul's suggestion would work.
@Andrew, the following suggestion would fix the new variable issue:
http://octopusdeploy.uservoice.com/forums/170787-general/suggestions/5731882-flags-to-know-which-steps-executed -
Andrew McClenaghan commented
To do this you would need some additional variables to support alerting based on the status of the deploy. There might be some of these already but couldn't find them in the Variables list.
-
Wayne Brantley commented
This :
"Additionally, if powershell was allowed, you could not edit/create plug-ins from the UI since they are simply scripts."Should have been this:
Additionally, if powershell was allowed, you could NOW edit/create plug-ins from the UI since they are simply scripts.
-
Wayne Brantley commented
I think if you would support the concept of 'plugins' that would solve this and other issues. Just allow us to drop plug-ins into a folder on OD server. Those plug ins become steps that are run just like any other step.
These plug-ins could be simple powershell scripts. This would handle this feature request http://octopusdeploy.uservoice.com/forums/170787-general/suggestions/5580197-create-central-script-library-just-like-the-varia because the library are simply these add-ins.
Additionally, if powershell was allowed, you could not edit/create plug-ins from the UI since they are simply scripts.
With powershell scripts, you could hit any endpoint or do any sort of notification you wanted, with all the features of any step.
Optionally, you could support .net plug-ins that implement some interface in case users wanted to write it like that.
-
Luke van der Hoeven commented
I'd love to see it run like a GitHub post-commit where it can posts something to a specified endpoint. That or open up a SignalR endpoint that can be listened to for events.
-
Tom Anderson commented
I really like the TFS approach to this. Plugins, you implement an interface, drop it in the bin/plugins directory, get notified of different events with the details of the event.
This option allows you to do pretty much whatever you want.
We have built tons of in house TFS Plugins that trigger everything from external bug/task tracking integration, to packing and publishing our octopus deployments on build quality changes.
-
Daniel Piessens commented
I really like the script library idea as a base for this. I agree it would be good to have a sample implementation so people would know how to do this as REST calls in Powershell isn't that straight forward if you don't know what you're doing.
-
Andrew Armstrong commented
-
arri-cc commented
Maybe there could be an extensible collection of Notifiers, with a few provided out of the box, while providing a basic API to plug in our own, that way the users can solve their own edge cases.
The Notifiers should have the option to be run as steps or subscribe to Audit events. For instance, I'd love to get notifications when new Tentacles are successfully registered.
-
Brannon Jones commented
Paul- we already use the PowerShell script option in our deployments. I would love to have notification support via a WebHook model. I don't think you'd need to worry about filtering of notifications. The WebHook consumer can be responsible for filtering the notifications, or transforming and forwarding notifications to other systems (i.e. CampFire, Hipchat, NewRelic, etc).
-
Andrew Armstrong commented
@PaulStovell a script option would be great; I already use a PostDeploy.ps1 script to send a message to our HipChat chat room, on both In Progress, Success and Failure, but a proper way to do it via Octopus would be good.
-
arri-cc commented
Could probably just do this via power shell
-
Sean commented
This is a good idea, we'd like to update out ticketing/bug tracking system when a release is done so we don't forget to do it manually.
-
Kevin Van Heusen commented
I have a previous suggestion to be able to launch a browser window after deployment. This could be done as a hook as well potentially? Kill two birds with one stone.
-
Matt Walkenhorst commented
I would use pre and post deploy hooks to bring up and take down VPN connections to our deployment sites.
-
Robert Gibbens commented
This would be a great feature. We'd use/contribute a Campfire notification, a twitter notification, and maybe a IM notification.