From 5459af2fb888303e3c2f2a1a31752957cc5e215f Mon Sep 17 00:00:00 2001 From: mikekks Date: Sun, 1 Dec 2024 01:42:46 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20admin=20=EB=AA=A8=EB=93=88=20ci-cd=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/aws-cicd-dev.yml | 20 ++++++++++++++++++++ .github/workflows/aws-cicd-prod.yml | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/.github/workflows/aws-cicd-dev.yml b/.github/workflows/aws-cicd-dev.yml index 83033cf9..9fdcb789 100644 --- a/.github/workflows/aws-cicd-dev.yml +++ b/.github/workflows/aws-cicd-dev.yml @@ -4,6 +4,7 @@ on: push: branches: - develop + - feat/LA-20 env: REGISTRY: "docker.io" @@ -56,6 +57,7 @@ jobs: run: | echo "${APPLICATION_SECRET_PROPERTIES}" > ./layer-api/src/main/resources/application-secret.properties echo "${APPLICATION_SECRET_PROPERTIES}" > ./layer-batch/src/main/resources/application-secret.properties + echo "${APPLICATION_SECRET_PROPERTIES}" > ./layer-admin/src/main/resources/application-secret.properties - name: Build layer-api module run: ./gradlew :layer-api:build @@ -69,6 +71,12 @@ jobs: - name: Test layer-batch module run: ./gradlew :layer-batch:test + - name: Build layer-admin module + run: ./gradlew :layer-admin:build + + - name: Test layer-admin module + run: ./gradlew :layer-admin:test + - name: Docker Hub Login uses: docker/login-action@v1 with: @@ -82,6 +90,7 @@ jobs: images: | ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-api ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-batch + ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-admin - name: Push layer-api Docker Image uses: docker/build-push-action@v4 @@ -104,6 +113,16 @@ jobs: tags: | ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-batch:latest + - name: Push layer-admin Docker Image + uses: docker/build-push-action@v4 + with: + context: ./layer-admin + file: ./layer-admin/Dockerfile-admin # Dockerfile 이름 지정 + platforms: linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-admin:latest + deploy: name: Deploy needs: [ build, setup ] @@ -119,6 +138,7 @@ jobs: run: | echo "${{ secrets.APPLICATION_SECRET_PROPERTIES }}" > ./layer-api/infra/${{ env.DEPLOY_TARGET }}/application-secret.properties echo "${{ secrets.APPLICATION_SECRET_PROPERTIES }}" > ./layer-batch/src/main/resources/application-secret.properties + echo "${{ secrets.APPLICATION_SECRET_PROPERTIES }}" > ./layer-admin/src/main/resources/application-secret.properties - name: Archive Files run: | diff --git a/.github/workflows/aws-cicd-prod.yml b/.github/workflows/aws-cicd-prod.yml index 6b3c8eb9..120105e4 100644 --- a/.github/workflows/aws-cicd-prod.yml +++ b/.github/workflows/aws-cicd-prod.yml @@ -57,6 +57,7 @@ jobs: run: | echo "${APPLICATION_SECRET_PROPERTIES}" > ./layer-api/src/main/resources/application-secret.properties echo "${APPLICATION_SECRET_PROPERTIES}" > ./layer-batch/src/main/resources/application-secret.properties + echo "${APPLICATION_SECRET_PROPERTIES}" > ./layer-admin/src/main/resources/application-secret.properties - name: Build layer-api module run: ./gradlew :layer-api:build @@ -70,6 +71,12 @@ jobs: - name: Test layer-batch module run: ./gradlew :layer-batch:test + - name: Build layer-admin module + run: ./gradlew :layer-admin:build + + - name: Test layer-admin module + run: ./gradlew :layer-admin:test + - name: Docker Hub Login uses: docker/login-action@v1 with: @@ -83,6 +90,7 @@ jobs: images: | ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-api ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-batch + ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-admin - name: Push layer-api Docker Image uses: docker/build-push-action@v4 @@ -106,6 +114,16 @@ jobs: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-batch:latest no-cache: true + - name: Push layer-admin Docker Image + uses: docker/build-push-action@v4 + with: + context: ./layer-admin + file: ./layer-admin/Dockerfile-admin # Dockerfile 이름 지정 + platforms: linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}_layer-admin:latest + deploy: name: Deploy needs: [ build, setup ] @@ -121,6 +139,7 @@ jobs: run: | echo "${{ secrets.APPLICATION_SECRET_PROPERTIES }}" > ./layer-api/infra/${{ env.DEPLOY_TARGET }}/application-secret.properties echo "${{ secrets.APPLICATION_SECRET_PROPERTIES }}" > ./layer-batch/src/main/resources/application-secret.properties + echo "${{ secrets.APPLICATION_SECRET_PROPERTIES }}" > ./layer-admin/src/main/resources/application-secret.properties - name: Archive Files run: |