Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4a7158b
refactor: 배포 워크플로우 통합 및 Dockerfile 빌드 단계 단순화
Whale0928 Dec 24, 2025
37e0af8
refactor: 이미지 태그 생성 로직 단순화 및 short-sha 기반으로 변경
Whale0928 Dec 24, 2025
aa9e4d6
docs: 어드민 회원가입 API RestDocs 문서 추가
Whale0928 Dec 24, 2025
0b18379
chore: CI 파이프라인에서 release/admin 브랜치 제외 조건 제거
Whale0928 Dec 24, 2025
78024ed
refactor: ROOT_ADMIN 초기화 로직 개선 및 탈퇴 방지
Whale0928 Dec 24, 2025
5f12328
fix: Quartz 클러스터링 설정 누락 속성 추가
Whale0928 Dec 24, 2025
06229e0
Merge remote-tracking branch 'origin/main'
Whale0928 Dec 24, 2025
971804e
fix: Quartz jobStore.class 주석 처리로 인한 설정 오류 수정
Whale0928 Dec 24, 2025
4bb5280
fix: DailyDataReportIntegrationTest Context 충돌 문제 해결
Whale0928 Dec 26, 2025
1833f83
fix: 테스트 환경에서 WebhookRestTemplate 빈 생성 제외
Whale0928 Dec 26, 2025
47e5f4c
refactor: CapturedRequest를 CapturedCall로 리네이밍 및 관련 메서드 수정
Whale0928 Dec 26, 2025
6f51986
refactor: FakeWebhookRestTemplate 리팩토링 및 메서드 개선
Whale0928 Dec 26, 2025
589d6b7
test: AdminAuthIntegrationTest에 ROOT_ADMIN 탈퇴 불가 테스트 추가
Whale0928 Dec 26, 2025
1206f88
fix: 개발 환경 password 추가 .
Whale0928 Dec 26, 2025
a264b0a
fix: API 문서 내 잘못된 주소 수정
Whale0928 Dec 28, 2025
c06e9fa
feat: Admin 문의사항 관리 API 구현 (목록/상세/답변)
Whale0928 Dec 30, 2025
8f3a84f
docs: Admin Help API 문서 추가
Whale0928 Dec 30, 2025
8569276
chore: 버전 1.0.6으로 업데이트
Whale0928 Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 25 additions & 64 deletions .github/workflows/deploy_v2_admin_api.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: deploy v2 admin api
name: deploy v2 admin api production

on:
workflow_dispatch:
Expand All @@ -8,7 +8,7 @@ on:
- 'release/admin'

concurrency:
group: "deploy-admin"
group: "deploy-admin-production"
cancel-in-progress: true

env:
Expand All @@ -31,6 +31,22 @@ jobs:
submodules: true
token: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: setup jdk
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: setup gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: read admin version
id: version
run: |
Expand All @@ -39,6 +55,10 @@ jobs:
echo "image-tag=admin_${VERSION}" >> $GITHUB_OUTPUT
echo "Admin version: $VERSION"

- name: build admin module
run: |
./gradlew :bottlenote-admin-api:build -x test -x asciidoctor --build-cache --parallel

- name: build and push to registry
id: build
uses: ./.github/actions/docker-build-push
Expand All @@ -52,73 +72,14 @@ jobs:
dockerfile: Dockerfile-admin
context: .
platforms: linux/arm64
cache-scope: admin
cache-scope: admin-production
image-title: "BottleNote Admin API"
image-description: "BottleNote Admin API Server"
image-vendor: "BottleNote"
image-authors: "BottleNote Team"
sign-image: 'true'
cosign-key-path: 'git.environment-variables/storage/docker-registry/cosign.key'
cosign-password: ${{ secrets.COSIGN_PASSWORD }}
update-development:
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: checkout code with submodules
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.GIT_ACCESS_TOKEN }}
- name: setup kustomize
uses: imranismail/setup-kustomize@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: update development image tag
run: |
IMAGE_TAG="${{ needs.build-and-push.outputs.image-tag }}"
REGISTRY="${{ secrets.REGISTRY_ADDRESS }}"

echo "Updating development image tag: $IMAGE_TAG"

cd git.environment-variables
git checkout main

cd deploy/overlays/development
kustomize edit set image \
bottlenote-admin-api=${REGISTRY}/${{ env.IMAGE_NAME }}:${IMAGE_TAG}

echo "development kustomization.yaml updated"

- name: commit and push with retry
run: |
cd git.environment-variables

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

git add deploy/overlays/development/kustomization.yaml

# 변경사항 있을 때만 커밋
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
fi

git commit -m "chore(admin): update development image tag to ${{ needs.build-and-push.outputs.image-tag }}

Updated by GitHub Actions
Commit: ${{ github.sha }}
Branch: ${{ github.ref_name }}
Workflow: ${{ github.workflow }}"

# 재시도 로직 (최대 5회)
for i in {1..5}; do
git pull --rebase origin main && git push origin main && break
echo "Push failed, retry $i/5..."
sleep $((i * 2))
done

echo "Development deployment triggered"

update-production:
needs: build-and-push
Expand All @@ -129,10 +90,12 @@ jobs:
with:
submodules: true
token: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: setup kustomize
uses: imranismail/setup-kustomize@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: update production image tag
run: |
IMAGE_TAG="${{ needs.build-and-push.outputs.image-tag }}"
Expand All @@ -158,7 +121,6 @@ jobs:

git add deploy/overlays/production/kustomization.yaml

# 변경사항 있을 때만 커밋
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
Expand All @@ -171,7 +133,6 @@ jobs:
Branch: ${{ github.ref_name }}
Workflow: ${{ github.workflow }}"

# 재시도 로직 (최대 5회)
for i in {1..5}; do
git pull --rebase origin main && git push origin main && break
echo "Push failed, retry $i/5..."
Expand Down
218 changes: 218 additions & 0 deletions .github/workflows/deploy_v2_development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
name: deploy v2 development

on:
workflow_dispatch:
workflow_run:
workflows: [ "product ci pipeline" ]
types:
- completed
branches:
- main

concurrency:
group: "deploy-development"
cancel-in-progress: true

jobs:
prepare-build:
runs-on: ubuntu-24.04-arm
outputs:
short-sha: ${{ steps.versions.outputs.short-sha }}
product-image-tag: ${{ steps.versions.outputs.product-image-tag }}
admin-image-tag: ${{ steps.versions.outputs.admin-image-tag }}
steps:
- name: checkout code with submodules
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: setup jdk
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: setup gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: generate image tags
id: versions
run: |
SHORT_SHA="${GITHUB_SHA::7}"
echo "short-sha=$SHORT_SHA" >> $GITHUB_OUTPUT
echo "product-image-tag=product_${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "admin-image-tag=admin_${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "Commit SHA: $SHORT_SHA"

- name: build both modules
run: |
./gradlew :bottlenote-product-api:build :bottlenote-admin-api:build \
-x test -x asciidoctor --build-cache --parallel

- name: upload product jar
uses: actions/upload-artifact@v4
with:
name: product-jar
path: bottlenote-product-api/build/libs/bottlenote-product-api.jar
retention-days: 1

- name: upload admin jar
uses: actions/upload-artifact@v4
with:
name: admin-jar
path: bottlenote-admin-api/build/libs/bottlenote-admin-api.jar
retention-days: 1

build-product-image:
needs: prepare-build
runs-on: ubuntu-24.04-arm
outputs:
image-digest: ${{ steps.build.outputs.image-digest }}
steps:
- name: checkout code with submodules
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: download product jar
uses: actions/download-artifact@v4
with:
name: product-jar
path: bottlenote-product-api/build/libs/

- name: build and push to registry
id: build
uses: ./.github/actions/docker-build-push
with:
registry-url: ${{ secrets.REGISTRY_ADDRESS }}
registry-username: ${{ secrets.REGISTRY_USERNAME }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
image-name: bottlenote-product-api
image-tag: ${{ needs.prepare-build.outputs.product-image-tag }}
additional-tags: product_latest_development
dockerfile: Dockerfile
context: .
platforms: linux/arm64
cache-scope: product-development
image-title: "BottleNote Product API"
image-description: "BottleNote Product API Server (Development)"
image-vendor: "BottleNote"
image-authors: "BottleNote Team"
sign-image: 'true'
cosign-key-path: 'git.environment-variables/storage/docker-registry/cosign.key'
cosign-password: ${{ secrets.COSIGN_PASSWORD }}

build-admin-image:
needs: prepare-build
runs-on: ubuntu-24.04-arm
outputs:
image-digest: ${{ steps.build.outputs.image-digest }}
steps:
- name: checkout code with submodules
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: download admin jar
uses: actions/download-artifact@v4
with:
name: admin-jar
path: bottlenote-admin-api/build/libs/

- name: build and push to registry
id: build
uses: ./.github/actions/docker-build-push
with:
registry-url: ${{ secrets.REGISTRY_ADDRESS }}
registry-username: ${{ secrets.REGISTRY_USERNAME }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
image-name: bottlenote-admin-api
image-tag: ${{ needs.prepare-build.outputs.admin-image-tag }}
additional-tags: admin_latest_development
dockerfile: Dockerfile-admin
context: .
platforms: linux/arm64
cache-scope: admin-development
image-title: "BottleNote Admin API"
image-description: "BottleNote Admin API Server (Development)"
image-vendor: "BottleNote"
image-authors: "BottleNote Team"
sign-image: 'true'
cosign-key-path: 'git.environment-variables/storage/docker-registry/cosign.key'
cosign-password: ${{ secrets.COSIGN_PASSWORD }}

update-development:
needs: [prepare-build, build-product-image, build-admin-image]
runs-on: ubuntu-latest
steps:
- name: checkout code with submodules
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: setup kustomize
uses: imranismail/setup-kustomize@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: update development image tags
run: |
PRODUCT_TAG="${{ needs.prepare-build.outputs.product-image-tag }}"
ADMIN_TAG="${{ needs.prepare-build.outputs.admin-image-tag }}"
REGISTRY="${{ secrets.REGISTRY_ADDRESS }}"

echo "Updating development image tags:"
echo " Product: $PRODUCT_TAG"
echo " Admin: $ADMIN_TAG"

cd git.environment-variables
git checkout main

cd deploy/overlays/development
kustomize edit set image \
bottlenote-product-api=${REGISTRY}/bottlenote-product-api:${PRODUCT_TAG} \
bottlenote-admin-api=${REGISTRY}/bottlenote-admin-api:${ADMIN_TAG}

echo "development kustomization.yaml updated"

- name: commit and push with retry
run: |
cd git.environment-variables

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

git add deploy/overlays/development/kustomization.yaml

if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
fi

git commit -m "chore(dev): update development image tags (${{ needs.prepare-build.outputs.short-sha }})

Product: ${{ needs.prepare-build.outputs.product-image-tag }}
Admin: ${{ needs.prepare-build.outputs.admin-image-tag }}

Updated by GitHub Actions
Commit: ${{ github.sha }}
Workflow: ${{ github.workflow }}"

for i in {1..5}; do
git pull --rebase origin main && git push origin main && break
echo "Push failed, retry $i/5..."
sleep $((i * 2))
done

echo "Development deployment triggered"
Loading