phallstrom / slackistrano

Slack integration for Capistrano deployments.
MIT License
374 stars 74 forks source link

Question: entire Capistrano output into Slack #59

Closed ghost closed 7 years ago

ghost commented 7 years ago

We're currently using Capistrano with Slackistrano and it works nicely, but we thought it would be even better if we could get a transcript of everything Capistrano outputs into our development Slack channel for live deploys, so that other developers can see live what's happening and be able to quickly jump in in case of errors.

I was able to "capture" remote command's output on the fly with a custom Interaction Handler, but how would I do this for the whole output, is there anyway way or ideas on how I could do it?

phallstrom commented 7 years ago

Hrm. I don't have any good ideas. I imagine you'd have to hijack Capistrano's logger and post whatever you receive to Slack. Not sure Slackistrano can really help with that as it stands now, but you could re-use the internal posting stuff.

phallstrom commented 7 years ago

@daniel-gomes-sociomantic You might look at https://github.com/phallstrom/slackistrano/issues/34 which suggests a way to post stacktrace on failure. Maybe that would get you the important bits?