Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): show stack progress info in cdk deploy/destroy commands #22883

Merged
merged 5 commits into from Dec 5, 2022
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/aws-cdk/lib/cdk-toolkit.ts
Expand Up @@ -251,7 +251,8 @@ export class CdkToolkit {
}
}

print('%s: deploying...', chalk.bold(stack.displayName));
const stackIndex = stacks.indexOf(stack)+1;
print('%s: deploying... [%s/%s]', chalk.bold(stack.displayName), stackIndex, stackCollection.stackCount);
const startDeployTime = new Date().getTime();

let tags = options.tags;
Expand Down Expand Up @@ -527,8 +528,8 @@ export class CdkToolkit {
}

const action = options.fromDeploy ? 'deploy' : 'destroy';
for (const stack of stacks.stackArtifacts) {
success('%s: destroying...', chalk.blue(stack.displayName));
for (const [index, stack] of stacks.stackArtifacts.entries()) {
success('%s: destroying... [%s/%s]', chalk.blue(stack.displayName), index+1, stacks.stackCount);
try {
await this.props.cloudFormation.destroyStack({
stack,
Expand Down