summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorrgnv <rondutt@gmail.com>2018-04-12 15:22:50 -0700
committerrgnv <rondutt@gmail.com>2018-04-12 15:22:50 -0700
commit09bcf46e276662ef518aac5fb11bc2eb4e127d36 (patch)
treef464316ecbf52e47ced87c064049972d7f578bf4 /docs
parent56ec279b2e9e2735ed88405fd177e77f9e376801 (diff)
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 fb80a19..d1b6925 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):
+
+```shell
+gem install cisco_spark
+```
+
+### ciscosparkdiff hook configuration example
+
+```yaml
+hooks:
+ ciscospark:
+ type: ciscosparkdiff
+ events: [post_store]
+ accesskey: [SPARK_BOT_API_OR_OAUTH_KEY](https://developer.ciscospark.com/apps.html)
+ space: [SPARK_SPACE_ID](https://developer.ciscospark.com/endpoint-rooms-get.html)
+ 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](https://developer.ciscospark.com/apps.html)
+ space: [SPARK_SPACE_ID](https://developer.ciscospark.com/endpoint-rooms-get.html)
+ 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.