hooks: Add a send_zulip_update_announcements post deploy hook.

This commit adds a post upgrade hook to run the
'send_zulip_update_announcements' management command.

The aim is to improve UX for self hosters by sending
zulip updates as soon as the upgrade completes instead
of waiting for the cron to run.
This commit is contained in:
Prakhar Pratyush
2024-04-01 21:02:18 +05:30
committed by Tim Abbott
parent 507d9c3281
commit 30273403ea
3 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
/home/zulip/deployments/current/manage.py send_zulip_update_announcements

View File

@@ -2,6 +2,8 @@
# in a cluster.
class zulip::app_frontend_once {
include zulip::hooks::send_zulip_update_announcements
$proxy_host = zulipconf('http_proxy', 'host', 'localhost')
$proxy_port = zulipconf('http_proxy', 'port', '4750')
if $proxy_host != '' and $proxy_port != '' {

View File

@@ -0,0 +1,9 @@
# @summary Send zuip update announcements after deploy
#
class zulip::hooks::send_zulip_update_announcements {
include zulip::hooks::base
zulip::hooks::file { [
'post-deploy.d/send_zulip_update_announcements.hook',
]: }
}