mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
circleci: Crudely clone a bit of is_travis logic.
This isn't really the right way to do this -- commit
dcd80e665 "travis/setup-backend: Remove the '--travis' flag"
took us in the wrong direction by introducing more magic, deeper in
the stack.
But it's the same way we do it for Travis. For now, just copy that.
[Thanks to hackerkid for cleaning up my original crude hack.]
This commit is contained in:
@@ -42,9 +42,11 @@ COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'coverage')
|
||||
LINECOVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'linecoverage-report')
|
||||
NODE_TEST_COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'node-coverage')
|
||||
|
||||
is_travis = 'TRAVIS' in os.environ
|
||||
is_circleci = 'CIRCLECI' in os.environ
|
||||
|
||||
# TODO: De-duplicate this with emoji_dump.py
|
||||
EMOJI_CACHE_PATH = "/srv/zulip-emoji-cache"
|
||||
is_travis = 'TRAVIS' in os.environ
|
||||
if is_travis:
|
||||
# In Travis CI, we don't have root access
|
||||
EMOJI_CACHE_PATH = "/home/travis/zulip-emoji-cache"
|
||||
@@ -295,7 +297,7 @@ def main(options):
|
||||
run(["scripts/setup/generate_secrets.py", "--development"])
|
||||
run(["tools/update-authors-json", "--use-fixture"])
|
||||
run(["tools/inline-email-css"])
|
||||
if is_travis and not options.is_production_travis:
|
||||
if is_circleci or (is_travis and not options.is_production_travis):
|
||||
run(["sudo", "service", "rabbitmq-server", "restart"])
|
||||
run(["sudo", "service", "redis-server", "restart"])
|
||||
run(["sudo", "service", "memcached", "restart"])
|
||||
|
||||
Reference in New Issue
Block a user