Project

ci_slack

0.0
No commit activity in last 3 years
No release in over 3 years
Send a message on failure of Continiues Integration to the specific channel with a link to the author of a last commit
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

CiSlack

This gem provide sending message about a failed step of continiues integration.

Getting Started

in config/initializes/ci_slack.rb

CiSlack.configure do |config|
  config.webhook = 'ci webhook'
  config.project = 'your project'
  config.slack_names = { mapping to slack names }
  config.skip_success_message = [skip who need not a message about a success pass of ci]
  config.failed_icon = 'slack icon (default "failed")'
  config.success_icon = 'slack icon (default "successful")'
  config.failed_title = 'slack icon (default "CI FAILED!")'
  config.success_title = 'slack icon (default "SUCCESS")'
  config.channel = 'slack channel (default "ci")'
  config.ci_computer = 'check name for ci computer (default "CI")'
  config.bot_name = 'name for sender to slack (default "CI BOT")'
end

example:

CiSlack.configure do |config|
  config.webhook = 'https://hooks.slack.com/services/XXXXXXXXX'
  config.project = 'your project'
  config.slack_names = { %r{криницын|skrinits} => 'skrinits' }
  config.icon = 'failed'
  config.channel = '#ci'
  config.ci_computer = 'CI'
  config.bot_name = 'CI BOT'
end

Rspec

in spec_helper.rb:

require 'ci_slack/rspec/notifier'

In code executed in a CI step:

require_relative '../../config/initializers/ci_slack'
require 'ci_slack/messager'

CiSlack::Messager.new.deliver(message_to_slack_channel, :failed)

In the task for a delivery information about success a pass of CI:

task :success_ci do
  require_relative '../../config/initializers/ci_slack'
  require 'ci_slack/messager'

  CiSlack::Messager.new.deliver
end