Skip to content

Commit

Permalink
ci: Remove the need of using TRAVIS in env.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
arpit551 authored and timabbott committed Apr 21, 2020
1 parent 4946405 commit e6edf46
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/lib/install
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ EOF
#
# (There are more possibilities in the case of dpkg errors.) Here
# 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
[rabbitmq]
Expand Down
6 changes: 1 addition & 5 deletions tools/ci/production-helper
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ if ! apt-get dist-upgrade -y "${APT_OPTIONS[@]}"; then
apt-get dist-upgrade -y "${APT_OPTIONS[@]}"
fi

# Disable existing rabbitmq node so we can change it
service rabbitmq-server stop
rm -rf /var/lib/rabbitmq/mnesia/

# Install Zulip
env TRAVIS=1 "$ZULIP_PATH"/scripts/setup/install --self-signed-cert --hostname 127.0.0.1 --email [email protected]
"$ZULIP_PATH"/scripts/setup/install --self-signed-cert --hostname 127.0.0.1 --email [email protected]

cat >>/etc/zulip/settings.py <<EOF
# Circle CI override settings above
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/setup-production
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tools/provision --production-test-suite || {
cp -a tools/ci/success-http-headers.txt ~/
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"
cat /tmp/tmp.*/update-prod-static.log || true
exit 1
Expand Down
2 changes: 1 addition & 1 deletion tools/provision
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ "$failed" -ne 0 ]; then
echo "* Logs are here: zulip/var/log/provision.log"
echo -e "$ENDC"
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 "WARNING: This shell does not have the Zulip Python 3 virtualenv activated."
echo "Zulip commands will fail until you activate the virtualenv."
Expand Down

0 comments on commit e6edf46

Please sign in to comment.