Closed strtwtsn closed 6 years ago
@strtwtsn Sorry, I forgot all about this. It should if you are loading that .env file yourself, but Slackistrno won't load an env file on it's own.
@strtwtsn you can do something like this in your config/deploy.rb
set :env_file, ".env.#{fetch(:stage)}"
set :slackistrano, -> {
{ channel: ENV['DEPLOY_NOTIFICATION_CHANNEL'], webhook: ENV['DEPLOY_NOTIFICATION_WEBHOOK'] }
}
namespace :env do
desc 'Load the stage env file'
task :load do
Dotenv.load(fetch(:env_file))
end
end
invoke 'env:load'
I have
set :slackistrano_webhook, ``ENV["SLACK_WEBHOOK"]
in my deploy.rb file and
SLACK_WEBHOOK=http://<webhook_url>
in my .env file but I receive the following error
Error: #
Should this work?