Closed ghost closed 7 years ago
We already use slackistrano to send this kind of message: "ERROR! mmoreno failed to deploy branch master of Gorilla to staging."
But we whant to be able to send something like
ERROR!* mmoreno failed to deploy branch master of Gorilla to staging. {{and here capistrano output or stack trace}}
Interesting. That might be a lot of output :) If capistrano can get access to that somehow we could do it. Not sure I'll get to it soon, but if you can poke around to see if you can access it within capistrano and post some code it would help.
I wil try these days... I'll let you know... thanks
For what it's worth, I was just poking around in the issue log here to see if this feature was available.
this might allow us to do that. https://github.com/capistrano/capistrano/issues/708
With the latest release of Slackistrano I think you can do this yourself via custom messaging.
https://github.com/phallstrom/slackistrano#customizing-the-messaging
With a class something like this:
module Slackistrano
class CustomMessaging < Messaging::Base
def payload_for_failed
# Do whatever you need to do with $! per
# https://github.com/capistrano/capistrano/issues/708#issuecomment-254844192
end
end
end
If one of you comes up with something useful let me know. I'd like to add more custom messaging examples to the wiki and this seems like a good one.
Hello I'm new to slackistrano and wondering if I could setup a message when deploy fails about the errors or the stack trace of the error.
Thanks in advance