Skip to content

Commit 067a1db

Browse files
committed
fix indentation problem in cleanup
1 parent 2a02966 commit 067a1db

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

.circleci/config.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ jobs:
380380
- destroy-environment
381381
- revert-migrations
382382
- notify-on-failure
383+
383384
cloudfront-update:
384385
docker:
385386
- image: cimg/base:stable
@@ -405,28 +406,28 @@ jobs:
405406
- destroy-environment
406407
- revert-migrations
407408

408-
cleanup:
409-
docker:
410-
- image: cimg/base:stable
411-
steps:
412-
- checkout
413-
- install-aws-cli
414-
- install-nodejs13
415-
- run:
416-
name: Remove old stacks and files
417-
command: |
418-
export STACKS=($(aws cloudformation list-stacks \
419-
--query "StackSummaries[*].StackName" \
420-
--stack-status-filter CREATE_COMPLETE --no-paginate --output text))
421-
echo Stack names: "${STACKS[@]}"
422-
export OldWorkflowID=$(curl --insecure https://kvdb.io/${KVDB_BUCKET}/old_workflow_id)
423-
echo Old Workflow ID: $OldWorkflowID
424-
if [[ "${STACKS[@]}" =~ "${OldWorkflowID}" ]]
425-
then
426-
aws s3 rm "s3://udapeople-${OldWorkflowID}" --recursive
427-
aws cloudformation delete-stack --stack-name "udapeople-backend-${OldWorkflowID}"
428-
aws cloudformation delete-stack --stack-name "udapeople-frontend-${OldWorkflowID}"
429-
fi
409+
cleanup:
410+
docker:
411+
- image: cimg/base:stable
412+
steps:
413+
- checkout
414+
- install-aws-cli
415+
- install-nodejs13
416+
- run:
417+
name: Remove old stacks and files
418+
command: |
419+
export STACKS=($(aws cloudformation list-stacks \
420+
--query "StackSummaries[*].StackName" \
421+
--stack-status-filter CREATE_COMPLETE --no-paginate --output text))
422+
echo Stack names: "${STACKS[@]}"
423+
export OldWorkflowID=$(curl --insecure https://kvdb.io/${KVDB_BUCKET}/old_workflow_id)
424+
echo Old Workflow ID: $OldWorkflowID
425+
if [[ "${STACKS[@]}" =~ "${OldWorkflowID}" ]]
426+
then
427+
aws s3 rm "s3://udapeople-${OldWorkflowID}" --recursive
428+
aws cloudformation delete-stack --stack-name "udapeople-backend-${OldWorkflowID}"
429+
aws cloudformation delete-stack --stack-name "udapeople-frontend-${OldWorkflowID}"
430+
fi
430431
431432
432433
workflows:

0 commit comments

Comments
 (0)