2015-10-15 01:47:42 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2015-12-08 05:31:53 +01:00
|
|
|
apt-get install -y openssl ssl-cert
|
2015-10-15 01:47:42 +02:00
|
|
|
ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/certs/zulip.combined-chain.crt
|
|
|
|
ln -s /etc/ssl/private/ssl-cert-snakeoil.key /etc/ssl/private/zulip.key
|
|
|
|
|
|
|
|
tar -xf zulip-server-travis.tar.gz
|
|
|
|
mv zulip-server-travis /root/zulip
|
|
|
|
|
2016-01-19 20:44:21 +01:00
|
|
|
# Do an apt upgrade to start with an up-to-date machine
|
2015-10-15 01:47:42 +02:00
|
|
|
export APT_OPTIONS="-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
|
2016-05-02 23:34:49 +02:00
|
|
|
apt-get update
|
2016-05-02 23:45:44 +02:00
|
|
|
# Hold upgrades to packages which are expensive to upgrade due to size
|
|
|
|
# or computational cost (e.g. initramfs rebuilds) and aren't really
|
|
|
|
# used by Zulip in production.
|
|
|
|
apt-mark hold initramfs-tools initramfs-tools-bin oracle-java8-installer udev linux-image-3.19.0-28-generic linux-image-generic-lts-vivid base-files linux-firmware chromium-browser google-chrome-stable g++-4.8 gcc-4.8 cpp-4.8 openjdk-6-jre-headless openjdk-7-jre-headless
|
2016-01-10 00:13:12 +01:00
|
|
|
apt-get upgrade -y $APT_OPTIONS
|
|
|
|
# Install Zulip
|
2016-04-28 07:32:27 +02:00
|
|
|
env TRAVIS=1 /root/zulip/scripts/setup/install
|
2015-10-15 01:47:42 +02:00
|
|
|
|
|
|
|
cat >>/etc/zulip/settings.py <<EOF
|
|
|
|
# Travis CI override settings above
|
|
|
|
EXTERNAL_HOST = 'zulip.travis.example.com'
|
|
|
|
ZULIP_ADMINISTRATOR = 'zulip-travis-admin@travis.example.com'
|
|
|
|
ADMIN_DOMAIN = 'travis.example.com'
|
|
|
|
AUTHENTICATION_BACKENDS = ( 'zproject.backends.EmailAuthBackend', )
|
|
|
|
NOREPLY_EMAIL_ADDRESS = 'noreply@travis.example.com'
|
|
|
|
DEFAULT_FROM_EMAIL = "Zulip <zulip@travis.example.com>"
|
|
|
|
EOF
|
|
|
|
|
|
|
|
su zulip -c /home/zulip/deployments/current/scripts/setup/initialize-database
|