From c123dc5f3e19cb358cf073a33b136a2c8033e66d Mon Sep 17 00:00:00 2001 From: longbui98 Date: Tue, 7 Nov 2023 13:33:53 +0700 Subject: [PATCH] Update cleanup job and deploy-infrastructure in only master branch --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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: