Skip to content

Commit

Permalink
Merge pull request #260 from HabitPay/chore/blue-green-컨테이너-종료-shell-…
Browse files Browse the repository at this point in the history
…script-작동하지-않는-문제-수정#258

🐛 fix: AWS SSM 실행 jobs 로 분리 #258
  • Loading branch information
Han-Joon-Hyeok authored Oct 6, 2024
2 parents 0c25088 + 55ed359 commit dab2c37
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
body: ${{ steps.tag_version.outputs.changelog }}

build-spring-and-docker-image:
needs: ["create-release"]
needs: [ "create-release" ]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
deploy-new-container:
runs-on: ubuntu-latest
needs: ["create-release", "build-spring-and-docker-image"]
needs: [ "create-release", "build-spring-and-docker-image" ]
steps:
- name: Deploy a new version of the container
uses: peterkimzz/aws-ssm-send-command@master
Expand All @@ -93,6 +93,10 @@ jobs:
command: /bin/bash ./git-pull.sh; /bin/bash ./deploy.sh "${{ secrets.DOCKERHUB_ACCOUNT }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${{ needs.create-release.outputs.new_tag }}"
comment: Deploy a New Version of the Container

switching-blue-green-traffic:
runs-on: ubuntu-latest
needs: [ "deploy-new-container" ]
steps:
- name: Change the backend container server in nginx
uses: peterkimzz/aws-ssm-send-command@master
id: ssm-change-nginx-server
Expand All @@ -106,6 +110,10 @@ jobs:
command: /bin/bash ./deploy.sh
comment: Change the backend container server in nginx

turn-off-previous-container:
runs-on: ubuntu-latest
needs: [ "switching-blue-green-traffic" ]
steps:
- name: Turn off the previous container
uses: peterkimzz/aws-ssm-send-command@master
id: ssm-turn-off-previous-container
Expand Down

0 comments on commit dab2c37

Please sign in to comment.