Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7d7a2b8
add(ci/cd): Bazel 빌드 산출물 gitignore 무시 규칙 추가
snowykte0426 Jun 10, 2026
9957e53
add(global): Bazel 빌드 마이그레이션 연구 스캐폴딩 추가
snowykte0426 Jun 10, 2026
c72d28b
add(global): rules_oci 컨테이너 배포 타겟 추가
snowykte0426 Jun 10, 2026
c96a3eb
refactor(global): KmpExport 프로세서 codeGenerator 기반 전환 및 JsExport 제거
snowykte0426 Jun 10, 2026
5c2a7f0
add(global): datagsm-shared KMP 모듈 Bazel 빌드 및 TS 패키지 추가
snowykte0426 Jun 10, 2026
0999996
add(global): 전체 서비스 모듈 OCI 이미지 타겟 추가
snowykte0426 Jun 10, 2026
172baed
test(global): 전체 모듈 Kotest 테스트 Bazel 타겟 추가
snowykte0426 Jun 10, 2026
e2db438
ci/cd(global): CI 빌드를 Bazel로 전환 및 CLAUDE.md 명령어 갱신
snowykte0426 Jun 10, 2026
dd9a7a1
add(global): ktlint 및 datagsm-shared publish Bazel 타겟 추가
snowykte0426 Jun 10, 2026
8e8c88f
ci/cd(global): stage CI 빌드를 Bazel로 전환
snowykte0426 Jun 10, 2026
71a06ed
ci/cd(global): CD 배포를 Bazel 빌드 산출물로 전환
snowykte0426 Jun 10, 2026
1d3b6ea
refactor(global): Gradle 빌드 완전 제거 및 Bazel 전환 완료
snowykte0426 Jun 10, 2026
f97cc2d
fix(global): npm 패키지 발행 버전을 CI 버전으로 스탬핑
snowykte0426 Jun 10, 2026
40580da
update(global): 런타임/서비스 JDK 25 정렬, shared SDK는 JVM 17 유지
snowykte0426 Jun 10, 2026
af90748
fix(ci/cd): OCI 베이스 멀티플랫폼 digest 고정으로 amd64 CI 빌드 수정
snowykte0426 Jun 10, 2026
649c421
ci/cd(global): GitHub Actions 버전 일괄 업그레이드 (setup-bazel 0.19.0, checko…
snowykte0426 Jun 10, 2026
a30829b
fix(global): publish 토큰 임시파일 trap 정리, POM 의존성 선언, SIGPIPE 회피
snowykte0426 Jun 10, 2026
4a58b88
ci/cd(global): CI에 ktlint 린트 게이트 추가, publish-jvm에 JDK setup 명시
snowykte0426 Jun 10, 2026
608db3d
add(global): IntelliJ Bazel 플러그인용 .bazelproject 프로젝트 뷰 추가
snowykte0426 Jun 13, 2026
157b278
add(global): IntelliJ Bazel 서비스 실행 run configuration 추가
snowykte0426 Jun 14, 2026
785f7cc
update(global): IntelliJ 필수 플러그인을 Gradle에서 Bazel로 변경
snowykte0426 Jun 14, 2026
73e1238
update(global): MODULE.bazel.lock 갱신
snowykte0426 Jun 14, 2026
e1f852b
merge(global): develop 브랜치 병합 및 충돌 해결
snowykte0426 Jun 18, 2026
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
14 changes: 14 additions & 0 deletions .bazelproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
directories:
bazel
datagsm-common
datagsm-ksp-processor
datagsm-oauth-authorization
datagsm-oauth-userinfo
datagsm-openapi
datagsm-shared
datagsm-web

derive_targets_from_directories: true

targets:
//...
15 changes: 15 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Bazel migration research config (research/bazel-migration branch).
# Additive only — does not affect the Gradle build.

common --enable_bzlmod

# Runtime + bytecode target JDK 25 to match the production server (eclipse-temurin:25).
# Bazel ships hermetic remote JDKs, so the host JDK is irrelevant. The KSP worker / build
# tools also run on JDK 25, so datagsm-ksp-processor can target 25 bytecode safely.
build --java_language_version=25
build --java_runtime_version=remotejdk_25
build --tool_java_language_version=25
build --tool_java_runtime_version=remotejdk_25

# Quieter, reproducible-ish local builds during research.
test --test_output=errors
10 changes: 6 additions & 4 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ DataGSM is a Spring Boot REST API service providing school information (students

## Commands

- Build: `./gradlew build`
- Test: `./gradlew test`
- Format: `./gradlew ktlintFormat`
- Run: `./gradlew :datagsm-{module}:bootRun`
Build system is **Bazel** (bazelisk).

- Build: `bazel build //...`
- Test: `bazel test //...`
- Format: `bazel run //bazel:ktlint -- -F` (check: `bazel run //bazel:ktlint`)
- Run: `bazel run //datagsm-{module}:{name}`

## Coding Conventions

Expand Down
85 changes: 40 additions & 45 deletions .github/workflows/datagsm-prod-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ jobs:
uses: actions/checkout@v6
with:
ref: ${{ inputs.branch || github.event.workflow_run.head_sha || 'master' }}
- name: Setup JDK 25
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: true
repository-cache: true
- name: Setup JDK for mvn deploy
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: false
cache-cleanup: always
java-version: '17'
- name: Publish JVM artifact to GitHub Packages
run: >
./gradlew :datagsm-common:kspKotlin
:datagsm-shared:publishJvmPublicationToGitHubPackagesRepository
-PSHARED_VERSION=${{ needs.generate-version.outputs.version }}
# --//bazel:kt_jvm_target=17 emits JVM 17 bytecode (SDK consumer floor), not the
# default JVM 25 the service modules use.
run: bazel run //datagsm-shared:publish --//bazel:kt_jvm_target=17 -- ${{ needs.generate-version.outputs.version }}
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -105,28 +105,28 @@ jobs:
uses: actions/checkout@v6
with:
ref: ${{ inputs.branch || github.event.workflow_run.head_sha || 'master' }}
- name: Setup JDK 25
uses: actions/setup-java@v5
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
java-version: '25'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: false
cache-cleanup: always
bazelisk-cache: true
disk-cache: true
repository-cache: true
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Assemble type-only npm package
run: >
./gradlew :datagsm-shared:assembleTsPackage
-PSHARED_VERSION=${{ needs.generate-version.outputs.version }}
run: |
bazel build //datagsm-shared:ts_package
mkdir -p npm-pkg && cp bazel-bin/datagsm-shared/npm/index.d.ts bazel-bin/datagsm-shared/npm/package.json npm-pkg/
# npm requires semver; CI passes "<yyyyMMdd>-<run>" → normalize to "<yyyyMMdd>.0.0-<run>".
RAW="${{ needs.generate-version.outputs.version }}"
NPM_VERSION=$(echo "$RAW" | sed -E 's/^([0-9]+)-([0-9]+)$/\1.0.0-\2/')
cd npm-pkg && npm version "$NPM_VERSION" --no-git-tag-version --allow-same-version
- name: Publish to npmjs.com
run: npm publish --access public
working-directory: datagsm-shared/build/npm-ts
working-directory: npm-pkg
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand All @@ -142,17 +142,12 @@ jobs:
with:
ref: ${{ inputs.branch || github.event.workflow_run.head_sha || 'master' }}

- name: Setup JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
cache-read-only: false
cache-cleanup: always
bazelisk-cache: true
disk-cache: true
repository-cache: true

- name: Make YML Files
run: |
Expand All @@ -174,8 +169,13 @@ jobs:
echo "${{ secrets.PROD_OAUTH_USERINFO_APPLICATION_YAML }}" > ./datagsm-oauth-userinfo/src/main/resources/application-prod.yml
shell: bash

- name: Build with Gradle
run: ./gradlew assemble
- name: Build with Bazel
run: >
bazel build
//datagsm-oauth-authorization:oauth-authorization_deploy_tar
//datagsm-openapi:openapi_deploy_tar
//datagsm-web:web_deploy_tar
//datagsm-oauth-userinfo:oauth-userinfo_deploy_tar

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
Expand All @@ -187,15 +187,10 @@ jobs:
- name: Make ZIP File
run: |
mkdir -p deploy-package
mkdir -p deploy-package/datagsm-oauth-authorization/build/libs
mkdir -p deploy-package/datagsm-openapi/build/libs
mkdir -p deploy-package/datagsm-web/build/libs
mkdir -p deploy-package/datagsm-oauth-userinfo/build/libs

cp datagsm-oauth-authorization/build/libs/*.jar deploy-package/datagsm-oauth-authorization/build/libs/
cp datagsm-openapi/build/libs/*.jar deploy-package/datagsm-openapi/build/libs/
cp datagsm-web/build/libs/*.jar deploy-package/datagsm-web/build/libs/
cp datagsm-oauth-userinfo/build/libs/*.jar deploy-package/datagsm-oauth-userinfo/build/libs/
for m in datagsm-oauth-authorization datagsm-openapi datagsm-web datagsm-oauth-userinfo; do
mkdir -p "deploy-package/$m"
tar xf "bazel-bin/$m/${m#datagsm-}_deploy_tar.tar" -C "deploy-package/$m"
done

cp datagsm-oauth-authorization/prod.dockerfile deploy-package/datagsm-oauth-authorization/
cp datagsm-openapi/prod.dockerfile deploy-package/datagsm-openapi/
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/datagsm-prod-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,31 +93,29 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v6

- name: Setup JDK 25
uses: actions/setup-java@v5
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
java-version: '25'
distribution: 'temurin'
bazelisk-cache: true
disk-cache: true
repository-cache: true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: false
cache-cleanup: always
- name: Build and Test with Bazel
run: bazel test //...

- name: Test with Gradle
run: ./gradlew build --parallel --build-cache
- name: Lint with ktlint
run: bazel run //bazel:ktlint

- name: Assemble type-only npm package
run: ./gradlew :datagsm-shared:assembleTsPackage --build-cache
run: bazel build //datagsm-shared:ts_package

- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: '24'

- name: Type-check generated index.d.ts
run: npx -y -p typescript@5 tsc --strict --noEmit datagsm-shared/build/npm-ts/index.d.ts
run: npx -y -p typescript@5 tsc --strict --noEmit bazel-bin/datagsm-shared/npm/index.d.ts

notify:
runs-on: ubuntu-latest
Expand Down
37 changes: 16 additions & 21 deletions .github/workflows/datagsm-stage-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,12 @@ jobs:
with:
ref: ${{ inputs.branch || github.event.workflow_run.head_branch || 'develop' }}

- name: Setup JDK 25
uses: actions/setup-java@v5
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
java-version: '25'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: false
cache-cleanup: always
bazelisk-cache: true
disk-cache: true
repository-cache: true

- name: Make YML Files
run: |
Expand All @@ -64,8 +59,13 @@ jobs:
echo "${{ secrets.STAGE_OAUTH_USERINFO_APPLICATION_YAML }}" > ./datagsm-oauth-userinfo/src/main/resources/application-stage.yml
shell: bash

- name: Build with Gradle
run: ./gradlew assemble
- name: Build with Bazel
run: >
bazel build
//datagsm-oauth-authorization:oauth-authorization_deploy_tar
//datagsm-openapi:openapi_deploy_tar
//datagsm-web:web_deploy_tar
//datagsm-oauth-userinfo:oauth-userinfo_deploy_tar

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
Expand All @@ -77,15 +77,10 @@ jobs:
- name: Make ZIP File
run: |
mkdir -p deploy-package
mkdir -p deploy-package/datagsm-oauth-authorization/build/libs
mkdir -p deploy-package/datagsm-openapi/build/libs
mkdir -p deploy-package/datagsm-web/build/libs
mkdir -p deploy-package/datagsm-oauth-userinfo/build/libs

cp datagsm-oauth-authorization/build/libs/*.jar deploy-package/datagsm-oauth-authorization/build/libs/
cp datagsm-openapi/build/libs/*.jar deploy-package/datagsm-openapi/build/libs/
cp datagsm-web/build/libs/*.jar deploy-package/datagsm-web/build/libs/
cp datagsm-oauth-userinfo/build/libs/*.jar deploy-package/datagsm-oauth-userinfo/build/libs/
for m in datagsm-oauth-authorization datagsm-openapi datagsm-web datagsm-oauth-userinfo; do
mkdir -p "deploy-package/$m"
tar xf "bazel-bin/$m/${m#datagsm-}_deploy_tar.tar" -C "deploy-package/$m"
done

cp datagsm-oauth-authorization/stage.dockerfile deploy-package/datagsm-oauth-authorization/
cp datagsm-openapi/stage.dockerfile deploy-package/datagsm-openapi/
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/datagsm-stage-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,29 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v6

- name: Setup JDK 25
uses: actions/setup-java@v5
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
java-version: '25'
distribution: 'temurin'
bazelisk-cache: true
disk-cache: true
repository-cache: true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: false
cache-cleanup: always
- name: Build and Test with Bazel
run: bazel test //...

- name: Test with Gradle
run: ./gradlew build --parallel --build-cache
- name: Lint with ktlint
run: bazel run //bazel:ktlint

- name: Assemble type-only npm package
run: ./gradlew :datagsm-shared:assembleTsPackage --build-cache
run: bazel build //datagsm-shared:ts_package

- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: '24'

- name: Type-check generated index.d.ts
run: npx -y -p typescript@5 tsc --strict --noEmit datagsm-shared/build/npm-ts/index.d.ts
run: npx -y -p typescript@5 tsc --strict --noEmit bazel-bin/datagsm-shared/npm/index.d.ts

notify:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ bin/
.idea/*
!.idea/externalDependencies.xml
!.idea/icon.svg
!.idea/runConfigurations
!.idea/runConfigurations/*
*.iws
*.iml
*.ipr
Expand Down Expand Up @@ -51,3 +53,8 @@ out/
PR_BODY.md
.pr-tmp/
/.claude/command.log

### Bazel ###
# Convenience symlinks into the build cache (bazel-bin, bazel-out, bazel-testlogs,
# bazel-<workspace>). MODULE.bazel.lock IS committed for reproducible resolution.
/bazel-*
2 changes: 1 addition & 1 deletion .idea/externalDependencies.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/oauth_authorization.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/oauth_userinfo.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/openapi.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/web.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading