Skip to content

Commit

Permalink
chore: admin 모듈 ci-cd 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Nov 30, 2024
1 parent 5f6c625 commit 5459af2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/aws-cicd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- develop
- feat/LA-20

env:
REGISTRY: "docker.io"
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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 ]
Expand All @@ -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: |
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/aws-cicd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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 ]
Expand All @@ -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: |
Expand Down

0 comments on commit 5459af2

Please sign in to comment.