mirror of https://github.com/zulip/zulip.git
travis: Remove Travis unwanted code.
Since in travis we don't have root access so we used to add different srv path. As now we shifted our production suites to Circle CI we don't need that code so removed it. Also we used a hacky code in commit-lint-message for travis which is now of no use.
This commit is contained in:
parent
1324e7798c
commit
7f769512aa
|
@ -13,8 +13,6 @@ from scripts.lib.zulip_tools import \
|
|||
|
||||
ENV = get_environment()
|
||||
EMOJI_CACHE_PATH = "/srv/zulip-emoji-cache"
|
||||
if ENV == "travis":
|
||||
EMOJI_CACHE_PATH = os.path.join(os.environ["HOME"], "zulip-emoji-cache")
|
||||
|
||||
def get_caches_in_use(threshold_days: int) -> Set[str]:
|
||||
setups_to_check = {ZULIP_PATH}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from typing import Set
|
||||
|
@ -14,14 +13,6 @@ from scripts.lib.zulip_tools import \
|
|||
|
||||
ENV = get_environment()
|
||||
NODE_MODULES_CACHE_PATH = "/srv/zulip-npm-cache"
|
||||
if ENV == "travis":
|
||||
NODE_MODULES_CACHE_PATH = os.path.join(os.environ["HOME"], "zulip-npm-cache")
|
||||
try:
|
||||
subprocess.check_output(["/home/travis/zulip-yarn/bin/yarn", '--version'])
|
||||
except OSError:
|
||||
print('yarn not found. Most probably we are running static-analysis and '
|
||||
'hence yarn is not installed. Exiting without cleaning npm cache.')
|
||||
sys.exit(0)
|
||||
|
||||
def get_caches_in_use(threshold_days: int) -> Set[str]:
|
||||
setups_to_check = {ZULIP_PATH}
|
||||
|
|
|
@ -15,8 +15,6 @@ from scripts.lib.zulip_tools import \
|
|||
|
||||
ENV = get_environment()
|
||||
VENV_CACHE_DIR = '/srv/zulip-venv-cache'
|
||||
if ENV == "travis":
|
||||
VENV_CACHE_DIR = os.path.join(os.environ["HOME"], "zulip-venv-cache")
|
||||
|
||||
def get_caches_in_use(threshold_days: int) -> Set[str]:
|
||||
setups_to_check = {ZULIP_PATH}
|
||||
|
|
|
@ -3,9 +3,6 @@ set -eo pipefail
|
|||
|
||||
ZULIP_PATH="$(dirname "$0")/../.."
|
||||
ZULIP_SRV="/srv"
|
||||
if [ "$TRAVIS" ] ; then
|
||||
ZULIP_SRV="/home/travis"
|
||||
fi
|
||||
YARN_PACKAGE_JSON="$ZULIP_SRV/zulip-yarn/package.json"
|
||||
node_version=12.16.1
|
||||
yarn_version=1.22.4
|
||||
|
|
|
@ -9,11 +9,6 @@ from scripts.lib.zulip_tools import subprocess_text_output, run
|
|||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
ZULIP_SRV_PATH = "/srv"
|
||||
|
||||
if 'TRAVIS' in os.environ:
|
||||
# In Travis CI, we don't have root access
|
||||
ZULIP_SRV_PATH = "/home/travis"
|
||||
|
||||
|
||||
NODE_MODULES_CACHE_PATH = os.path.join(ZULIP_SRV_PATH, 'zulip-npm-cache')
|
||||
YARN_BIN = os.path.join(ZULIP_SRV_PATH, 'zulip-yarn/bin/yarn')
|
||||
YARN_PACKAGE_JSON = os.path.join(ZULIP_SRV_PATH, 'zulip-yarn/package.json')
|
||||
|
|
|
@ -10,10 +10,6 @@ from typing import List, Optional, Tuple, Set
|
|||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
VENV_CACHE_PATH = "/srv/zulip-venv-cache"
|
||||
|
||||
if 'TRAVIS' in os.environ:
|
||||
# In Travis CI, we don't have root access
|
||||
VENV_CACHE_PATH = "/home/travis/zulip-venv-cache"
|
||||
|
||||
VENV_DEPENDENCIES = [
|
||||
"build-essential",
|
||||
"libffi-dev",
|
||||
|
|
|
@ -214,8 +214,6 @@ def log_management_command(cmd: str, log_path: str) -> None:
|
|||
def get_environment() -> str:
|
||||
if os.path.exists(DEPLOYMENTS_DIR):
|
||||
return "prod"
|
||||
if os.environ.get("TRAVIS"):
|
||||
return "travis"
|
||||
return "dev"
|
||||
|
||||
def get_recent_deployments(threshold_days: int) -> Set[str]:
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Lint all commit messages that are newer than upstream/master if running
|
||||
# locally or the commits in the push or PR if in Travis CI.
|
||||
# locally or the commits in the push or PR if in Circle CI.
|
||||
|
||||
# The rules can be found in /.gitlint
|
||||
|
||||
if [ "$TRAVIS" ]; then
|
||||
# Work around https://github.com/travis-ci/travis-ci/issues/4596
|
||||
range="${TRAVIS_COMMIT_RANGE/.../..}"
|
||||
elif [[ "
|
||||
if [[ "
|
||||
$(git remote -v)
|
||||
" =~ '
|
||||
'([^[:space:]]*)[[:space:]]*(https://github\.com/|ssh://git@github\.com/|git@github\.com:)zulip/zulip(\.git|/)?\ \(fetch\)'
|
||||
|
|
|
@ -29,7 +29,6 @@ if TYPE_CHECKING:
|
|||
|
||||
VAR_DIR_PATH = os.path.join(ZULIP_PATH, 'var')
|
||||
|
||||
is_travis = 'TRAVIS' in os.environ
|
||||
is_circleci = 'CIRCLECI' in os.environ
|
||||
|
||||
if not os.path.exists(os.path.join(ZULIP_PATH, ".git")):
|
||||
|
|
|
@ -72,10 +72,6 @@ EMOJI_POS_INFO_TEMPLATE = """\
|
|||
# change directory
|
||||
os.chdir(EMOJI_SCRIPT_DIR_PATH)
|
||||
|
||||
if 'TRAVIS' in os.environ:
|
||||
# In Travis CI, we don't have root access
|
||||
EMOJI_CACHE_PATH = "/home/travis/zulip-emoji-cache"
|
||||
|
||||
def main() -> None:
|
||||
if not os.access(EMOJI_CACHE_PATH, os.W_OK):
|
||||
# Note: In production, this block will fail, since we don't
|
||||
|
|
|
@ -16,8 +16,6 @@ TOOLS_DIR = os.path.abspath(os.path.dirname(__file__))
|
|||
ZULIP_PATH = os.path.dirname(TOOLS_DIR)
|
||||
REQS_DIR = os.path.join(ZULIP_PATH, 'requirements')
|
||||
CACHE_DIR = os.path.join(ZULIP_PATH, 'var', 'tmp')
|
||||
if 'TRAVIS' in os.environ:
|
||||
CACHE_DIR = os.path.join(os.environ['HOME'], 'misc')
|
||||
CACHE_FILE = os.path.join(CACHE_DIR, 'requirements_hashes')
|
||||
|
||||
def print_diff(path_file1: str, path_file2: str) -> None:
|
||||
|
|
Loading…
Reference in New Issue