Capistrano notifications in Zulip
Run zulip-send from a deployment task to notify your organization. This
example uses Capistrano 3 and Ruby Open3 to pass arguments without a shell.
It sends a message after deploy:finished; it does not deploy anything itself.
Create a bot, subscribe it to deployments,
and download its zuliprc. Install the zulip Python package on the machine
running Capistrano. Store the credentials privately and use the actual absolute
paths to zulip-send and the configuration file. Add to your task definitions:
require "open3"
namespace :notify do
desc "Send a deployment notification"
task :pero do
stdout, stderr, status = Open3.capture3(
"/path/to/venv/bin/zulip-send",
"--config-file", "/private/capistrano/zuliprc",
"--stream", "deployments",
"--subject", "releases",
"--message", "Deployment finished: #{fetch(:stage)}"
)
raise "Notification failed (exit #{status.exitstatus})" unless status.success?
end
end
after "deploy:finished", "notify:pero"
Configuration Options
Change the hook, destination channel, topic (--subject), and message for your
workflow. A notification error raises after deployment has finished; it does
not roll back the release. Choose and test your error policy explicitly rather
than hiding failures with || true. Never put API keys in task text or logs.
Related documentation
Deployment and access
For SaaS, hybrid, on-premises, or a carrier-managed service, agree on an HTTPS route from the source service to the organization API. Separate bots, credentials, and destination channels per customer. Subscribe the bot and grant private channel access explicitly. Notifications can expose source details to readers without source-system access. These adapters do not replicate source permissions or provide a durable delivery queue. Monitor API failures. Access tokens are not BYOK storage encryption keys; configure customer-managed keys separately.
Logos are trademarks of their respective owners. None of the integrations on this page are created by, affiliated with, or supported by the companies represented by the logos.