Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions rsconnect/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ def _finalize_deploy(
file_name: str,
app_id: int,
app_mode: AppMode,
name: str,
deployment_name: str,
title: str,
title_is_default: bool,
bundle: typing.IO[bytes],
Expand All @@ -755,7 +755,7 @@ def _finalize_deploy(
:param file_name: the primary file or directory being deployed.
:param app_id: the ID of an existing application to deploy new files for.
:param app_mode: the app mode to use.
:param name: the name to use for the deploy.
:param deployment_name: the name to use for the deploy.
:param title: the title to use for the deploy.
:param title_is_default: a flag noting whether the title carries a defaulted value.
:param bundle: the bundle to deploy.
Expand All @@ -766,7 +766,7 @@ def _finalize_deploy(
:return: the ultimate URL where the deployed app may be accessed and the sequence
of log lines. The log lines value will be None if a log callback was provided.
"""
app = deploy_bundle(connect_server, app_id, name, title, title_is_default, bundle, None)
app = deploy_bundle(connect_server, app_id, deployment_name, title, title_is_default, bundle, None)
app_url, log_lines, _ = spool_deployment_log(connect_server, app, log_callback)
app_store.set(
connect_server.url,
Expand Down Expand Up @@ -1771,7 +1771,7 @@ def create_quarto_deployment_bundle(
def deploy_bundle(
remote_server: api.TargetableServer,
app_id: int,
name: str,
deployment_name: str,
title: str,
title_is_default: bool,
bundle: typing.IO[bytes],
Expand All @@ -1782,24 +1782,39 @@ def deploy_bundle(

:param remote_server: the server information.
:param app_id: the ID of the app to deploy, if this is a redeploy.
:param name: the name for the deploy.
:param deployment_name: the name for the deploy.
:param title: the title for the deploy.
:param title_is_default: a flag noting whether the title carries a defaulted value.
:param bundle: the bundle to deploy.
:param env_vars: list of (name, value) pairs for the app environment
:return: application information about the deploy. This includes the ID of the
task that may be queried for deployment progress.
"""
ce = RSConnectExecutor(
server=remote_server,
if isinstance(remote_server, api.RSConnectServer):
ce = RSConnectExecutor(
url=remote_server.url,
api_key=remote_server.api_key,
insecure=remote_server.insecure,
ca_data=remote_server.ca_data,
cookies=remote_server.cookie_jar,
)
elif isinstance(remote_server, api.ShinyappsServer) or isinstance(remote_server, api.CloudServer):
ce = RSConnectExecutor(
url=remote_server.url,
account=remote_server.account_name,
token=remote_server.token,
secret=remote_server.secret,
)
else:
raise RSConnectException("Unable to infer Connect client.")
ce.deploy_bundle(
app_id=app_id,
name=name,
deployment_name=deployment_name,
title=title,
title_is_default=title_is_default,
bundle=bundle,
env_vars=env_vars,
)
ce.deploy_bundle()
return ce.state["deployed_info"]


Expand Down