#!/usr/bin/env bash # Given a Zulip production environment that had been installed with a # previous version of Zulip, upgrade it to the commit being tested. # This takes as input the tarball generated by production-build. set -e set -x # Start the services that would be running on a working Zulip host; # since this is a container, these services are not started # automatically. # Start the postgresql service. sudo service postgresql start # Starting the rabbitmq-server epmd -daemon sudo service rabbitmq-server start # Start the supervisor sudo service supervisor start # Zulip releases before 2.1.8/3.5/4.4 have a bug in their # `upgrade-zulip` scripts, resulting in them exiting with status 0 # unconditionally. We work around that by running # scripts/lib/upgrade-zulip instead. UPGRADE_SCRIPT=/home/zulip/deployments/current/scripts/lib/upgrade-zulip # Execute the upgrade. sudo "$UPGRADE_SCRIPT" /tmp/zulip-server-test.tar.gz