Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ci: Update CI to test once with custom db name and user.
Adam Birds9aab03654e22
diff --git a/.github/workflows/production-suite.yml b/.github/workflows/production-suite.ymlindex 1e5588c6959..6c9e419c6c9 100644--- a/.github/workflows/production-suite.yml+++ b/.github/workflows/production-suite.yml@@ -113,24 +113,28 @@ jobs:# Base images are built using `tools/ci/Dockerfile.template`.# The comments at the top explain how to build and upload these images.- docker_image: zulip/ci:bionic- name: Bionic production install+ name: Bionic production install with custom db name and useris_bionic: trueos: bionic+ install-command: /tmp/production-install --test-custom-db- docker_image: zulip/ci:focalname: Focal production installis_focal: trueos: focal+ install-command: /tmp/production-install- docker_image: zulip/ci:bustername: Buster production installis_buster: trueos: buster+ install-command: /tmp/production-install- docker_image: zulip/ci:bullseyename: Bullseye production installis_bullseye: trueos: bullseye+ install-command: /tmp/production-installname: ${{ matrix.name }}container: ${{ matrix.docker_image }}@@ -181,7 +185,7 @@ jobs:- name: Install productionrun: |sudo service rabbitmq-server restart- sudo /tmp/production-install+ sudo ${{ matrix.install-command }}- name: Verify installrun: sudo /tmp/production-verifydiff --git a/tools/ci/production-install b/tools/ci/production-installindex 24dc986b209..232494b22fc 100755--- a/tools/ci/production-install+++ b/tools/ci/production-install@@ -4,6 +4,41 @@set -eset -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 ran 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-latestmkdir -p "$ZULIP_PATH"tar -xf /tmp/zulip-server-test.tar.gz -C "$ZULIP_PATH" --strip-components=1@@ -45,8 +80,14 @@ if [ "$os_version_codename" = "bionic" ]; thenexport POSTGRESQL_VERSION=10fi-# Install Zulip-"$ZULIP_PATH"/scripts/setup/install --self-signed-cert --hostname 127.0.0.1 --email [email protected]+# 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 [email protected]+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 [email protected] --postgresql-database-user zulipcustomuser --postgresql-database-name zulipcustomdb+fiif [ "$os_version_codename" = "bionic" ]; thenif [ "$(crudini --get /etc/zulip/zulip.conf postgresql version)" != "10" ]; then