Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in receiving the notifications #43

Open
AstmDesign opened this issue Aug 14, 2018 · 0 comments
Open

Issue in receiving the notifications #43

AstmDesign opened this issue Aug 14, 2018 · 0 comments

Comments

@AstmDesign
Copy link

Hello Guys,
First I would like to thank you for you creating this amazing Gem, but I did all the steps in my code and from the terminal when stating deploy to the server I saw in the terminal
slack:starting & slack:finished but actually didn't got the notification on slack !!
so what is missing in my deploy.rb file?!!
this is my deploy.rb credentials:

require 'capistrano/slack'

set :deployer do
  name = `git config user.name`.strip
  name = `whoami`.strip if name == ''
  name
end

set :slack_token, 'https://hooks.slack.com/services/............etc ' # comes from inbound webhook integration
set :slack_room, '#deploying' # room
set :slack_subdomain, 'astm' # if your subdomain is astm.slack.com
set :slack_emoji, ':shipit:' # ":rocket:"
set :slack_deploy_defaults, false
set :slack_application, "myApp"
set :slack_username, "Deploying on server"

namespace :slack do
  task :starting do
    slack_connect "#{fetch(:deployer)} *started* deploying to *#{fetch(:stage)}*. :rocket:"
  end

  task :finished do
    slack_connect "#{fetch(:deployer)} *finished* deploying to *#{fetch(:stage)}*. :star2:"
  end
end

before 'deploy:update_code', 'slack:starting'
after 'deploy:restart', 'slack:finished' 

And in my Gemfile I added & bundle install

group :development do
	# For Notifying slack
	gem 'capistrano-slack'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant