From 55ed3599b2063f512819cdb359a815286be60e51 Mon Sep 17 00:00:00 2001 From: JoonHyeok Han Date: Mon, 7 Oct 2024 00:38:23 +0900 Subject: [PATCH] =?UTF-8?q?:bug:=20fix:=20AWS=20SSM=20=EC=8B=A4=ED=96=89?= =?UTF-8?q?=20jobs=20=EB=A1=9C=20=EB=B6=84=EB=A6=AC=20#258?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0d7b8451..b3a97f4c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -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 @@ -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 @@ -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 @@ -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