Skip to content

Commit

Permalink
Update cleanup job and deploy-infrastructure in only master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
longbui98 committed Nov 7, 2023
1 parent adb6ca1 commit c123dc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit c123dc5

Please sign in to comment.