snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
This commit is contained in:
93
tools/ci/production-install
Executable file
93
tools/ci/production-install
Executable file
@@ -0,0 +1,93 @@
|
||||
#!/usr/bin/env bash
|
||||
# This test installs a Zulip production environment (from the release
|
||||
# tarball from production-build).
|
||||
set -e
|
||||
set -x
|
||||
|
||||
usage() {
|
||||
cat <<'EOF'
|
||||
Usage:
|
||||
production-install
|
||||
production-install --test-custom-db
|
||||
production-install --help
|
||||
|
||||
Options:
|
||||
--test-custom-db
|
||||
This will instruct the install test to be run with a custom database name and user.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# Shell option parsing.
|
||||
args="$(getopt -o '' --long help,test-custom-db -n "$0" -- "$@")"
|
||||
eval "set -- $args"
|
||||
while true; do
|
||||
case "$1" in
|
||||
--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--test-custom-db)
|
||||
TEST_CUSTOM_DB=1
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
ZULIP_PATH=/root/zulip-latest
|
||||
mkdir -p "$ZULIP_PATH"
|
||||
tar -xf /tmp/zulip-server-test.tar.gz -C "$ZULIP_PATH" --strip-components=1
|
||||
|
||||
# Disable interactive prompts from apt.
|
||||
echo 'Dpkg::Options { "--force-confdef" "--force-confold" }' >/etc/apt/apt.conf.d/noninteractive
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Do an apt upgrade to start with an up-to-date machine
|
||||
apt-get update
|
||||
|
||||
if ! apt-get dist-upgrade -y; then
|
||||
echo "\`apt-get dist-upgrade\`: Failure occurred while trying to perform distribution upgrade, Retrying..."
|
||||
apt-get dist-upgrade -y
|
||||
fi
|
||||
|
||||
os_info="$(
|
||||
. /etc/os-release
|
||||
printf '%s\n' "$ID" "$VERSION_ID"
|
||||
)"
|
||||
{
|
||||
read -r os_id
|
||||
read -r os_version_id
|
||||
} <<<"$os_info"
|
||||
|
||||
# Pin PostgreSQL on Ubuntu 22.04, so we can test upgrading it
|
||||
if [ "$os_id $os_version_id" = 'ubuntu 22.04' ]; then
|
||||
export POSTGRESQL_VERSION=14
|
||||
fi
|
||||
|
||||
# Install
|
||||
if [ -z "$TEST_CUSTOM_DB" ]; then
|
||||
echo "Testing production install with default database name and user."
|
||||
"$ZULIP_PATH"/scripts/setup/install --self-signed-cert --hostname 127.0.0.1 --email ci@example.com
|
||||
else
|
||||
echo "Testing production install with custom database name and user."
|
||||
"$ZULIP_PATH"/scripts/setup/install --self-signed-cert --hostname 127.0.0.1 --email ci@example.com --postgresql-database-user zulipcustomuser --postgresql-database-name zulipcustomdb
|
||||
fi
|
||||
|
||||
if [ -n "${POSTGRESQL_VERSION:-}" ]; then
|
||||
if [ "$(crudini --get /etc/zulip/zulip.conf postgresql version)" != "$POSTGRESQL_VERSION" ]; then
|
||||
echo "Installer did not install the PostgreSQL $POSTGRESQL_VERSION that we asked for!"
|
||||
exit 1
|
||||
fi
|
||||
if ! su - zulip -c "psql -tc 'select version()'" | grep -q "^ PostgreSQL $POSTGRESQL_VERSION\."; then
|
||||
echo "Installed PostgreSQL is not actually PostgreSQL $POSTGRESQL_VERSION!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Production installation complete!"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user