@@ -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
432433workflows :
0 commit comments