diff --git a/.circleci/config.yml b/.circleci/config.yml index 26bf41f..520075d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -378,9 +378,9 @@ jobs: - run: name: Remove old stacks and files command: | - aws s3 rm "s3://udapeople-${OldWorkflowID}" --recursive - aws cloudformation delete-stack --stack-name "udapeople-backend-${OldWorkflowID}" - aws cloudformation delete-stack --stack-name "udapeople-frontend-${OldWorkflowID}" + aws s3 rm "s3://${OldWorkflowID}" --recursive + aws cloudformation delete-stack --stack-name "udapeople-backend-${CIRCLE_WORKFLOW_ID:0:7}" + aws cloudformation delete-stack --stack-name "udapeople-frontend-${CIRCLE_WORKFLOW_ID:0:7}" workflows: default: @@ -399,7 +399,7 @@ workflows: requires: [test-frontend, test-backend, scan-frontend, scan-backend] filters: branches: - only: [test-feature-branch] + only: [master] - configure-infrastructure: requires: [deploy-infrastructure] - run-migrations: