Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7ad0d4a
:tada: feat: 기초 세팅 [KOBG-4]
Jul 26, 2025
399895f
:memo: docs: pr 템플릿 추가 [KOBG-4]
Jul 26, 2025
27080b3
:memo: docs: pr 템플릿 수정 [KOBG-4]
Jul 26, 2025
773e3e2
:wrench: chore(build): swagger, 테스트용 Mockito 라이브러리 추가 및 Checkstyle/ja…
Aug 16, 2025
ee7f02b
:wrench: chore(config): Naver Checkstyle 규칙 적용 [KOBG-4]
Aug 16, 2025
5c86353
:wrench: chore(config): checkstyle 개행 문자 규칙 적용을 위해 .gitattributes에 LF…
Aug 16, 2025
7e11b7b
:sparkles: feat: 에러 코드 형식 정의 [KOBG-4]
Aug 16, 2025
0acdde4
:sparkles: feat: 글로벌 에러 코드 추가 [KOBG-4]
Aug 16, 2025
f3914b3
:sparkles: feat: 내부 예외 처리를 위한 AppException 클래스 추가 [KOBG-4]
Aug 16, 2025
71c4270
:sparkles: feat: 정해진 응답 형식을 위한 dto 추가 [KOBG-4]
Aug 16, 2025
f386d87
:sparkles: feat: 글로벌 예외 핸들러 추가 [KOBG-4]
Aug 16, 2025
2418360
:sparkles: feat: 기본 시간 기록(create_at, update_at) 필드를 위한 BaseTime 엔티티 추…
Aug 16, 2025
f6184e9
:wrench: chore(config): OpenAPI(Swagger) 설정 클래스 추가 [KOBG-4]
Aug 16, 2025
1a167f6
:art: style: naver convention에 맞춰 수정 [KOBG-4]
Aug 16, 2025
5e911b9
:wrench: chore(build): Dockerfile 추가 [KOBG-4]
Aug 17, 2025
dcaf73e
:construction_worker: chore(ci): cicd를 위한 workflow 추가 [KOBG-4]
Aug 17, 2025
7c3ea03
:construction_worker: chore(ci): cd 워크플로 실행 트리거 시점 변경 [KOBG-4]
Aug 17, 2025
246468e
:construction_worker: chore(ci): cd 워크플로 실행 트리거 시점 추가 [KOBG-4]
Aug 17, 2025
c4ea2b7
:construction_worker: chore(ci): cd 워크플로 실행 트리거 시점 수정 [KOBG-4]
Aug 17, 2025
2252ef9
:recycle: refactor: 잘못된 kobridge 폴더 삭제[KOBG-4]
Aug 17, 2025
19293b6
:construction_worker: chore(ci): cd IMAGE_TAG 환경변수 설정 유지를 위한 띄어쓰기 제거 …
Aug 17, 2025
826c62e
:construction_worker: chore(ci): docker-compose.yml 경로와 통일 [KOBG-4]
Aug 17, 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
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --- 개행 문자 규칙 ---
# 모든 텍스트 파일은 LF로 통일
# checkstyle 규칙 적용을 위한 설정 (window 개행 문자 문제)
* text=auto eol=lf

# --- 예외 규칙 ---
# Windows 환경에서만 CRLF가 꼭 필요한 경우 (.bat 파일)
*.bat text eol=crlf

# --- 파일 종류 ---
# 이미지/바이너리 파일은 변환 금지
*.png binary
*.jar binary
35 changes: 35 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## 🔑 JIRA 이슈 키

<!-- KOBR-123 한국어 레슨 별 조회 API -->

---

## ✒ 진행한 작업

- [x] 진행한 작업
- [x] 진행한 작업
- [x] 진행한 작업

---

## 💡 생겼던 문제 및 해결법

1️⃣ 요약

- 문제:
- 해결:

---

## 📢 아쉬운 부분 및 개선점

- ...

---

## 📚 개발에 참고한 자료 및 포인트

- 참고한 부분 요약 및 포인트
- link

---
59 changes: 59 additions & 0 deletions .github/workflows/cd-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Java CD with Gradle

on:
push:
branches:
- main
- feature/KOBG-4/initial-setting

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: 🔄 체크아웃 코드
uses: actions/checkout@v4

- name: ☕ JDK 17 설치
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'corretto'

- name: 📝 application.yml 생성
run: |
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.PROPERTIES }}" > ./application.yml
shell: bash

- name: 🔧 빌드 권한 부여
run: chmod +x gradlew

- name: 🏗️ 프로젝트 jar 파일 제작
run: |
chmod +x gradlew
./gradlew bootJar

- name: 🐳 Docker 로그인
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}

- name: 🏗️ Docker 이미지 빌드 및 푸시
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }} .
docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }}

- name: 🚀 EC2에 프로젝트 전송 및 배포
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd /home/ubuntu/app
export IMAGE_TAG=${{ github.sha }} sudo docker compose up -d --pull always
sudo docker ps
sudo docker image prune -f
61 changes: 61 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Java CI with Gradle

on:
pull_request:
branches:
- main
- develop

permissions:
contents: read
checks: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: 🔄 체크아웃
uses: actions/checkout@v4

- name: ☕ JDK 17 설치
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'corretto'

- name: 📝 application.yml 생성
run: |
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.PROPERTIES }}" > ./application.yml
shell: bash

- name: 🚀 Redis 실행
uses: supercharge/redis-github-action@1.1.0
with:
redis-version: latest

- name: 🔧 빌드 권한 부여
run: chmod +x gradlew

- name: 🛠️ 테스트 프로파일 설정
run: echo "SPRING_PROFILES_ACTIVE=test" >> $GITHUB_ENV

- name: 🏗️ 프로젝트 빌드
run: ./gradlew clean build

- name: 📊 자코코 리포트 작성
uses: madrapps/jacoco-report@v1.6.1
with:
title: 📊 Jacoco Test Coverage
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 0

- name: ✅ 테스트 리포트 작성
uses: mikepenz/action-junit-report@v4
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Secrets ###
.application.properties
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:17-jdk
LABEL authors="yerim"
ARG JAR_FILE=build/libs/*SNAPSHOT.jar
COPY ${JAR_FILE} /app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
73 changes: 73 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
plugins {
id 'java'
id 'checkstyle'
id 'jacoco'
id 'org.springframework.boot' version '3.5.4'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.edu'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
// spring-boot-starter
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'

// Swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.8'

// lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

// mysql
runtimeOnly 'com.mysql:mysql-connector-j'

// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.mockito:mockito-core:5.18.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.18.0'
}

compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

checkstyle {
configFile = file("checkstyle/naver-checkstyle-rules.xml")
configProperties = ["suppressionFile": file("checkstyle/naver-checkstyle-suppressions.xml")]
}

jacoco {
toolVersion = '0.8.11'
}

jacocoTestReport {
reports {
html.required = true
xml.required = true
}
}

tasks.named('test') {
useJUnitPlatform()
}
Loading