ci: Remove the need of using TRAVIS in env.

Since now we want to use production suites on Circle CI so there
is no need to set TRAVIS in env while running scripts.

CIRCLECI is set default in the enviroment of Circle CI builds
so we can use it directly.

Also Travis CI had rabbitmq-server installed so we had to add workaround
in install script to avoid the error. That workaround is removed.
This commit is contained in:
arpit551 2020-04-22 02:21:04 +05:30 committed by Tim Abbott
parent 4946405e3a
commit e6edf469ee
4 changed files with 4 additions and 8 deletions

View File

@ -276,7 +276,7 @@ EOF
# #
# (There are more possibilities in the case of dpkg errors.) Here # (There are more possibilities in the case of dpkg errors.) Here
# we are checking for either empty or not-installed. # we are checking for either empty or not-installed.
if [ -n "$TRAVIS" ] || ! dpkg-query --showformat '${Status}\n' -W rabbitmq-server 2>/dev/null | grep -vq ' not-installed$'; then if ! dpkg-query --showformat '${Status}\n' -W rabbitmq-server 2>/dev/null | grep -vq ' not-installed$'; then
cat <<EOF cat <<EOF
[rabbitmq] [rabbitmq]

View File

@ -17,12 +17,8 @@ if ! apt-get dist-upgrade -y "${APT_OPTIONS[@]}"; then
apt-get dist-upgrade -y "${APT_OPTIONS[@]}" apt-get dist-upgrade -y "${APT_OPTIONS[@]}"
fi fi
# Disable existing rabbitmq node so we can change it
service rabbitmq-server stop
rm -rf /var/lib/rabbitmq/mnesia/
# Install Zulip # Install Zulip
env TRAVIS=1 "$ZULIP_PATH"/scripts/setup/install --self-signed-cert --hostname 127.0.0.1 --email circleci@example.com "$ZULIP_PATH"/scripts/setup/install --self-signed-cert --hostname 127.0.0.1 --email circleci@example.com
cat >>/etc/zulip/settings.py <<EOF cat >>/etc/zulip/settings.py <<EOF
# Circle CI override settings above # Circle CI override settings above

View File

@ -23,7 +23,7 @@ tools/provision --production-test-suite || {
cp -a tools/ci/success-http-headers.txt ~/ cp -a tools/ci/success-http-headers.txt ~/
source tools/ci/activate-venv source tools/ci/activate-venv
if ! env TRAVIS=1 ./tools/build-release-tarball test; then if ! ./tools/build-release-tarball test; then
echo "Attempting to output failure logging data" echo "Attempting to output failure logging data"
cat /tmp/tmp.*/update-prod-static.log || true cat /tmp/tmp.*/update-prod-static.log || true
exit 1 exit 1

View File

@ -38,7 +38,7 @@ if [ "$failed" -ne 0 ]; then
echo "* Logs are here: zulip/var/log/provision.log" echo "* Logs are here: zulip/var/log/provision.log"
echo -e "$ENDC" echo -e "$ENDC"
exit "$failed" exit "$failed"
elif [ "$VIRTUAL_ENV" != "/srv/zulip-py3-venv" ] && [ -z "${TRAVIS}${SKIP_VENV_SHELL_WARNING}" ]; then elif [ "$VIRTUAL_ENV" != "/srv/zulip-py3-venv" ] && [ -z "${CIRCLECI}${SKIP_VENV_SHELL_WARNING}" ]; then
echo -e "$WARNING" echo -e "$WARNING"
echo "WARNING: This shell does not have the Zulip Python 3 virtualenv activated." echo "WARNING: This shell does not have the Zulip Python 3 virtualenv activated."
echo "Zulip commands will fail until you activate the virtualenv." echo "Zulip commands will fail until you activate the virtualenv."