mirror of https://github.com/zulip/zulip.git
upgrade-zulip: Use deploy_options specified in zulip.conf.
Fixes #10534. upgrade-zulip can now also accept the same deploy options as upgrade-zulip-from-git and pass it as arguments to upgrade-zulip-stage-2.
This commit is contained in:
parent
29dce7c9b9
commit
3231306736
|
@ -5,13 +5,19 @@ import sys
|
|||
import subprocess
|
||||
import logging
|
||||
import time
|
||||
import configparser
|
||||
from typing import List
|
||||
|
||||
TARBALL_ARCHIVE_PATH = "/home/zulip/archives"
|
||||
os.environ["PYTHONUNBUFFERED"] = "y"
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, \
|
||||
su_to_zulip, get_deployment_lock, release_deployment_lock, assert_running_as_root
|
||||
su_to_zulip, get_deployment_lock, release_deployment_lock, assert_running_as_root, \
|
||||
get_config_file, get_deploy_options
|
||||
|
||||
config_file = get_config_file() # type: configparser.RawConfigParser
|
||||
deploy_options = get_deploy_options(config_file) # type: List[str]
|
||||
|
||||
assert_running_as_root(strip_lib_from_paths=True)
|
||||
|
||||
|
@ -49,6 +55,7 @@ try:
|
|||
# version is much better for fixing bugs in the upgrade process).
|
||||
deploy_path = deploy_path.strip()
|
||||
os.chdir(deploy_path)
|
||||
subprocess.check_call([os.path.abspath("./scripts/lib/upgrade-zulip-stage-2"), deploy_path])
|
||||
subprocess.check_call([os.path.abspath("./scripts/lib/upgrade-zulip-stage-2"), deploy_path]
|
||||
+ deploy_options)
|
||||
finally:
|
||||
release_deployment_lock()
|
||||
|
|
Loading…
Reference in New Issue