mirror of https://github.com/zulip/zulip.git
upgrade-zulip-stage-2: Added argument to skip purging old deployments.
This makes it possible to add --skip-purge-old-deployments in the deploy_options section of /etc/zulip/zulip.conf, and control whether old deployments are purged automatically on a system. We still need to do https://github.com/zulip/zulip/issues/10534 and probably also to add these arguments to be directly passed into upgrade-zulip, but that can wait for future work. Fixes #10946.
This commit is contained in:
parent
08e315e962
commit
76c6cf8c3a
|
@ -41,6 +41,8 @@ parser.add_argument("--skip-migrations", dest="skip_migrations", action='store_t
|
||||||
help="Skip doing migrations.")
|
help="Skip doing migrations.")
|
||||||
parser.add_argument("--from-git", dest="from_git", action='store_true',
|
parser.add_argument("--from-git", dest="from_git", action='store_true',
|
||||||
help="Upgrading from git, so run update-prod-static.")
|
help="Upgrading from git, so run update-prod-static.")
|
||||||
|
parser.add_argument("--skip-purge-old-deployments", dest="skip_purge_old_deployments",
|
||||||
|
action="store_true", help="Skip purging old deployments.")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
deploy_path = args.deploy_path
|
deploy_path = args.deploy_path
|
||||||
|
@ -178,4 +180,8 @@ logging.info("Restarting Zulip...")
|
||||||
subprocess.check_output(["./scripts/restart-server"], preexec_fn=su_to_zulip)
|
subprocess.check_output(["./scripts/restart-server"], preexec_fn=su_to_zulip)
|
||||||
logging.info("Upgrade complete!")
|
logging.info("Upgrade complete!")
|
||||||
|
|
||||||
|
if not args.skip_purge_old_deployments:
|
||||||
|
logging.info("Purging old deployments...")
|
||||||
subprocess.check_call(["./scripts/purge-old-deployments"])
|
subprocess.check_call(["./scripts/purge-old-deployments"])
|
||||||
|
else:
|
||||||
|
logging.info("Skipping purging old deployments.")
|
||||||
|
|
Loading…
Reference in New Issue