This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is not a maintained open-source project so let's not give airs that it is by declaring a bunch of RubyGems dependencies. They're superfluous, anyway, because everything one needs comes with any Chef installation.
- Loading branch information
Richard Crowley
committed
Oct 29, 2019
1 parent
52b0417
commit f3a24e6
Showing
5 changed files
with
8 additions
and
183 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,17 @@ | ||
# Chef::Handler::SlackReporting | ||
|
||
The chef-handler-slack gem is a Chef report mechanism that sends | ||
failures to a Slack channel. | ||
|
||
## Usage | ||
|
||
Create a new recipe, with the following contents, and add it to the runlist of your base role in Chef: | ||
Distribute this Ruby class via a Chef `file` resource and activate it with a Chef resource to this effect: | ||
|
||
```ruby | ||
chef_gem "chef-handler-slack" do | ||
action :upgrade | ||
end | ||
|
||
require 'chef/handler/slack' | ||
|
||
chef_handler "Chef::Handler::SlackReporting" do | ||
source "chef/handler/slack" | ||
chef_handler 'Chef::Handler::SlackReporting' do | ||
action :nothing | ||
arguments [ | ||
# The name of your team registered with Slack | ||
:team => "tinyspeck", | ||
|
||
# Your incoming webhook token | ||
:token => "someawesometoken", | ||
|
||
# An existing channel | ||
:channel => "#chef", | ||
|
||
# Watever. | ||
:icon_emoj => ":chef:", | ||
channel_id: channel_id, | ||
token: token, | ||
workspace_id: workspace_id, | ||
] | ||
action :nothing | ||
source '/usr/local/lib/chef-handler-slack.rb' | ||
end.run_action(:enable) | ||
``` | ||
|
||
## Contributing | ||
|
||
1. Fork it ( https://github.com/[my-github-username]/chef-handler-slack/fork ) | ||
2. Create your feature branch (`git checkout -b my-new-feature`) | ||
3. Commit your changes (`git commit -am 'Add some feature'`) | ||
4. Push to the branch (`git push origin my-new-feature`) | ||
5. Create a new Pull Request | ||
This sample code is provided as-is for the benefit of the community that uses both Chef and Slack. Since Slack made this code available we've evolved the code considerably but in ways that don't make sense to incorporate into an open-source offering. Nonetheless, this basic starting point still applies so take it and run with it. |
This file was deleted.
Oops, something went wrong.