summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2018-04-27 18:07:59 +0300
committerGitHub <noreply@github.com>2018-04-27 18:07:59 +0300
commit41c7e965e0f78600d4baf2da1e4720f44c06233c (patch)
tree681a76d70cd7cd425758806bfef0623510277513 /docs
parentf4be8c0665eb33e07a81450882162deb3c9b6022 (diff)
parent2bb40ad4d9e31cf2cd63a373f7c607eb86547e46 (diff)
Merge pull request #1280 from rgnv/master
Added Cisco Spark hook
Diffstat (limited to 'docs')
-rw-r--r--docs/Hooks.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/Hooks.md b/docs/Hooks.md
index ff430ca..09b6117 100644
--- a/docs/Hooks.md
+++ b/docs/Hooks.md
@@ -184,6 +184,43 @@ hooks:
Note the channel name must be in quotes.
+## Hook type: ciscosparkdiff
+
+The `ciscosparkdiff` hook posts config diffs to a [Cisco Spark](https://www.ciscospark.com/) space of your choice. It only triggers for `post_store` events.
+
+You will need to manually install the `cisco_spark` gem on your system (see [cisco_spark-ruby](https://github.com/NGMarmaduke/cisco_spark-ruby)) and generate either a [Bot or OAUTH access key](https://developer.ciscospark.com/apps.html), and retrieve the [Spark Space ID](https://developer.ciscospark.com/endpoint-rooms-get.html)
+
+```shell
+gem install cisco_spark
+```
+
+### ciscosparkdiff hook configuration example
+
+```yaml
+hooks:
+ ciscospark:
+ type: ciscosparkdiff
+ events: [post_store]
+ accesskey: SPARK_BOT_API_OR_OAUTH_KEY
+ space: SPARK_SPACE_ID
+ diff: true
+```
+
+Optionally you can disable snippets and post a formatted message, for instance linking to a commit in a git repo. Named parameters `%{node}`, `%{group}`, `%{model}` and `%{commitref}` are available.
+
+```yaml
+hooks:
+ ciscospark:
+ type: ciscosparkdiff
+ events: [post_store]
+ accesskey: SPARK_BOT_API_OR_OAUTH_KEY
+ space: SPARK_SPACE_ID
+ diff: false
+ message: "%{node} %{group} %{model} updated https://git.intranet/network-changes/commit/%{commitref}"
+```
+
+Note the space and access tokens must be in quotes.
+
## Hook type: xmppdiff
The `xmppdiff` hook posts config diffs to a [XMPP](https://en.wikipedia.org/wiki/XMPP) chatroom of your choice. It only triggers for `post_store` events.