Comments (7)
There's already a few different cookbooks out there that provide a resource to do this. I'm not sure this cookbook needs to start competing with them, but maybe it would make this one the best out there too.
from chef-slack_handler.
I was having a look around for one, any suggestions for a good one? I think it'd be good to align the messaging and potentially even support custom events sent from anywhere inside the calling cookbook. I had a look through the chef start handlers earlier but couldn't find any decent examples. Are the cookbooks you refer to generally using start handlers?
from chef-slack_handler.
Well, you mentioned deploys, and there's a few that have a custom resource you can feed into one of the blocks of the various deploy resources, e.g.
deploy 'foo' do
before_start do
slack_message 'its happening'
end
...
end
So they actually line up more with deploying than the start of the chef run. I agree, if you're referring to the start of the chef run, that there's not much out there.
Regarding the custom resources, there's:
https://github.com/rackspace-cookbooks/chatops_notify
https://github.com/KennaSecurity/chef-slack
from chef-slack_handler.
I've had a go at this, inspired by the work done here which is in turn inspired by this one. Please could you have a look through and let me know what you think? If the general idea is ok, I will add some tests plus support for the Slackr handler and doc updates.
The output in Slack looks a bit like this:
:gear: Chef client run started on webhook-debian-79 using cookbooks ["slack_handler 0.6.0", "chef_handler 1.3.0"]
from chef-slack_handler.
@c-knowles I made one comment, but it looks useful to me.
from chef-slack_handler.
The draft looks good to me, @c-knowles. Let me know when/if you're ready for a PR.
from chef-slack_handler.
Resolved in #24
from chef-slack_handler.
Related Issues (20)
- webhook triggered on success with fail_only=true HOT 2
- icon_url config not read in slack_handler_webhook.rb
- Support webhook default configuration from Slack UI HOT 4
- Add support for cookbook context HOT 2
- default['chef_client']['handler']['slack']['fail_only'] is ignored when using webhooks HOT 5
- `channel` listed as optional but slackr requires it HOT 2
- Add support for environment HOT 5
- At latest version problems when changing message_detail_level from basic to other HOT 4
- undefined method `run_context' for Chef:Class HOT 10
- why-run mode not working when using this cookbook HOT 1
- Integrating Slack Handler into client.rb? HOT 5
- no implicit conversion of Chef::DelayedEvaluator into String HOT 6
- WARN: Failed to send message to Slack: undefined local variable or method `run_context' for #<SlackHandlerUtil:0x00000001d8e1d0> HOT 11
- better handling of webhook messages with encoding problems
- Initial run fails due to missing /var/chef/handlers directory HOT 1
- NameError: uninitialized constant Chef::Handler::Slack HOT 1
- chef_handler 3.0 breaks it HOT 2
- Handler does not alert on custom exceptions HOT 3
- Ridley error when uploading cookbook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef-slack_handler.