Skip to content

Commit

Permalink
chore: store and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
v3g42 committed Oct 8, 2023
1 parent 2c1774c commit da0f4e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dozer-cli/src/cloud/deployer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ pub async fn deploy_app(
let deployment_id = response.deployment_id;
let url = response.deployment_url;
info!("Deploying new application with App Id: {app_id}, Deployment Id: {deployment_id}");
info!("Follow the deployment progress at {url}");

CloudAppContext::save_app_id(app_id.clone())?;
if follow {
print_progress(client, app_id, deployment_id).await?;
} else {
info!("Follow the deployment progress at {url}");
}

Ok::<(), CloudError>(())
Expand All @@ -63,12 +64,11 @@ async fn print_progress(
if response.status == DeploymentStatus::Success as i32 {
info!("Deployment completed successfully");
info!("You can get API requests samples with `dozer cloud api-request-samples`");

CloudAppContext::save_app_id(app_id)?;

break;
} else if response.status == DeploymentStatus::Failed as i32 {
warn!("Deployment failed!");
info!("Cleaning up...");
CloudAppContext::delete_config_file()?;
break;
} else {
let steps = response.steps.clone();
Expand Down
1 change: 1 addition & 0 deletions dozer-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ fn run() -> Result<(), OrchestrationError> {
})
}

#[cfg(feature = "cloud")]
fn run_cloud(
cloud: &dozer_cli::cli::cloud::Cloud,
runtime: Arc<Runtime>,
Expand Down

0 comments on commit da0f4e0

Please sign in to comment.