Skip to content

Commit

Permalink
Added "Deployment completed." message after streaming deployment logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
BSick7 committed Nov 21, 2024
1 parent ee7326e commit c1af85f
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.0.131 (Nov 21, 2024)
* Added "Deployment completed." message after streaming deployment logs.

# 0.0.130 (Nov 21, 2024)
* Created fallback when we cannot find app deployment workflow.

9 changes: 7 additions & 2 deletions cmd/deploy.go
Original file line number Diff line number Diff line change
@@ -97,10 +97,12 @@ func streamDeployLogs(ctx context.Context, osWriters logging.OsWriters, cfg api.
}
fmt.Fprintln(stdout, updated.Reference)
switch updated.Status {
case types.DeployStatusCompleted:
colorstring.Fprintln(stderr, "[green]Deployment completed.[reset]")
case types.DeployStatusCancelled:
return fmt.Errorf("Deploy was cancelled.")
return fmt.Errorf("Deployment was cancelled.")
case types.DeployStatusFailed:
return fmt.Errorf("Deploy failed to complete: %s", updated.StatusMessage)
return fmt.Errorf("Deployment failed to complete: %s", updated.StatusMessage)
}
return nil
}
@@ -131,6 +133,9 @@ func streamDeployIntentLogs(ctx context.Context, osWriters logging.OsWriters, cf
colorstring.Fprintln(stderr, "[yellow]We cannot find the deployment workflow to report the deployment logs.[reset]")
colorstring.Fprintln(stderr, "[bold]Waiting for successful deployment without reporting deployment logs...[reset]")
iw, err = waitForCompletedIntentWorkflow(ctx, cfg, iw)
if err == nil {
colorstring.Fprintln(stderr, "[green]Deployment completed.[reset]")
}
return err
}

0 comments on commit c1af85f

Please sign in to comment.