add dry-run flag to upgrade command
This commit is contained in:
parent
fc7846c55c
commit
3b062342e5
|
@ -548,7 +548,8 @@ def deploy(apps, run_cmds, force, converge_checks):
|
|||
@cli.command()
|
||||
@click.option('-a', '--apps', multiple=True)
|
||||
@click.option('-r', '--run-cmds', is_flag=True)
|
||||
def upgrade(apps, run_cmds):
|
||||
@click.option('-d', '--dry-run', is_flag=True)
|
||||
def upgrade(apps, run_cmds, dry_run):
|
||||
""" Deploy all the apps """
|
||||
deployed_domains = get_deployed_apps(apps)
|
||||
for _, instance_config in CONFIGS.items():
|
||||
|
@ -578,7 +579,8 @@ def upgrade(apps, run_cmds):
|
|||
print(f"{domain} is already at version {version}")
|
||||
continue
|
||||
print(f'upgrade {domain} from version {deployed_version} to version "{version}"')
|
||||
print(abra("app", *cmd))
|
||||
if not dry_run:
|
||||
print(abra("app", *cmd))
|
||||
if run_cmds:
|
||||
logging.info(f'execute commands for {domain}')
|
||||
execute_cmds(app_config)
|
||||
|
|
Loading…
Reference in New Issue