mirror of https://github.com/zulip/zulip.git
integrations/capistrano: Update docs to conform to style guide.
Thanks to Wes of TurboVote for submitting this integration! https://gist.github.com/cap10morgan/5100822
This commit is contained in:
parent
718492638b
commit
3df759337d
|
@ -1,20 +1,20 @@
|
|||
{!download-python-bindings.md!}
|
||||
Get Zulip notifications for your Capistrano deploys!
|
||||
|
||||
Once you've done that, you'll use the `zulip-send` utility to
|
||||
notify you when certain events happen.
|
||||
1. {!create-a-bot-indented.md!}
|
||||
|
||||
Here's some example code for sending a Zulip notification after
|
||||
a deployment has completed:
|
||||
1. {!download-python-bindings.md!}
|
||||
|
||||
```bash
|
||||
1. You can now send Zulip messages by calling the `zulip-send`
|
||||
utility from your `deploy.rb` config file. Here's some example code for
|
||||
sending a Zulip notification when a deployment has completed:
|
||||
|
||||
``` bash
|
||||
after 'deploy', 'notify:humbug'
|
||||
|
||||
namespace :notify do
|
||||
desc "Post a message to Zulip that we've deployed"
|
||||
desc "Post a message to Zulip after deploy"
|
||||
task :humbug do
|
||||
# this will post to Zulip as the user defined in
|
||||
# ~/.zuliprc if you omit --user and --api-key
|
||||
run_locally "echo ':beers: I just deployed to #{stage}! :beers:' | zulip-send \
|
||||
run_locally "echo 'I just deployed to #{stage}! :tada:' | zulip-send \
|
||||
--user capistrano-bot@example.com --api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \
|
||||
--site={{ api_url }} \
|
||||
--stream commits --subject deployments || true"
|
||||
|
@ -22,21 +22,20 @@ namespace :notify do
|
|||
end
|
||||
```
|
||||
|
||||
Some notes:
|
||||
The `--user` and `--api-key` should be the email and API key of the Zulip
|
||||
bot created above. You can also put these values in a `~/.zuliprc` file on
|
||||
your Capistrano machine. See our [API docs](/api) for instructions on
|
||||
creating that file.
|
||||
|
||||
* If you prefer not to use `--user` and `--api-key` above, you
|
||||
can fill out `~/.zuliprc` on your Capistrano machine. For
|
||||
instructions on how to write that file, see
|
||||
[the API page](/api).
|
||||
!!! tip ""
|
||||
|
||||
* You may need to change the `deploy` above to another step of
|
||||
your deployment process, if you'd like the notification to fire
|
||||
at a different time.
|
||||
You can change the `deploy` above to another step of
|
||||
your deployment process, if you'd like the notification to fire
|
||||
at a different time. See [Capistrano's Before/After Hooks page][1]
|
||||
for more information!
|
||||
|
||||
[1]: http://capistranorb.com/documentation/getting-started/before-after/
|
||||
|
||||
{!congrats.md!}
|
||||
|
||||
![](/static/images/integrations/capistrano/001.png)
|
||||
|
||||
###### Thanks to Wes of TurboVote for [submitting this integration][1]!
|
||||
|
||||
[1]: https://gist.github.com/cap10morgan/5100822
|
||||
|
|
Loading…
Reference in New Issue