Capistrano and GitLab to Slack integration.
Add this line to your application's Gemfile:
gem 'mls_ruby_capistrano_slacker', tag: 'vX.X.X', github: 'MLSDev/mls_ruby_capistrano_slacker'And then execute:
$ bundleOr install it yourself as:
$ gem install mls_ruby_capistrano_slackerUpdate Capfile
require 'capistrano/mls_ruby_capistrano_slacker'Add variable to your stage
set :mls_ruby_capistrano_slacker_webhook_url, ENV.fetch('CAPISTANO_SLACKER_WEBHOOK_URL')
set :mls_ruby_capistrano_slacker_display_display_random_picture, true # Default value false
set :mls_ruby_capistrano_slacker_notify_about_beginning, true # Default value falseAnd don't forget to set mls_ruby_gitlab_private_token. You can generate it using this guide.
We prefere to set env variables via UI.
set :mls_ruby_gitlab_private_token, ENV.fetch('GITLAB__PRIVATE_TOKEN')Also, if you want to publish release description to your Slack - just set following variable in your deploy configs
set :mls_ruby_capistrano_slacker_post_release_description, trueIf You really need to have this gem inside your project, and dont want to see messages from that, You can add following key to deploy.rb or deploy configs:
set :mls_ruby_capistrano_slacker_skip, true- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
The gem is available as open source under the terms of the MIT License.