phallstrom / slackistrano

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

Restrict the slack notification in staging and development #86

Closed raviskit closed 6 years ago

raviskit commented 6 years ago

Hi,

I used this gem and now its posting notifications for every deployment in any environments or using any branch. I want a hook which allows it to post notifications if a production deployment happens and disable it for development and staging environment. I tried using set :slackistrano, false if Rails.env == 'staging' but its giving error as Rails is not available.

Please address this issue.

Thank you

phallstrom commented 6 years ago

You can disable specific environments by setting set :slackistrano, false in that environments deploy configuration (ie. deploy/staging.yml).

See: https://github.com/phallstrom/slackistrano#disabling-posting-to-slack