Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BE Deploy #383

Closed
wants to merge 172 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
c4ce9c2
깃허브 액션 CI 워크플로 작성 (#6)
hyena0608 Jul 17, 2023
6c6b304
feat: 프로젝트 생성 및 의존성 추가
shb03323 Jul 17, 2023
aa42181
chore: logging 설정
shb03323 Jul 17, 2023
be88313
feat: Member Entity 생성
shb03323 Jul 17, 2023
a12a5d8
refactor: Member 패키지 변경
shb03323 Jul 17, 2023
64a133b
feat: Runner Entity 생성
shb03323 Jul 17, 2023
31fbab7
refactor: 모든 entity 에서 embeddedId 제거
shb03323 Jul 18, 2023
f8bde69
feat: Company null 예외 검증 구현
shb03323 Jul 18, 2023
2ff22d6
feat: Email null 예외 검증 구현
shb03323 Jul 18, 2023
35cd174
feat: GithubUrl null 예외 검증 구현
shb03323 Jul 18, 2023
dc3e424
feat: Name null 예외 검증 구현
shb03323 Jul 18, 2023
0742ff2
feat: OauthId null 예외 검증 구현
shb03323 Jul 18, 2023
e9bb454
feat: Member null 예외 검증 구현
shb03323 Jul 18, 2023
336e126
refactor: Grade 패키지 위치 변경
shb03323 Jul 18, 2023
f2e0409
refactor: TotalRating 매직 넘버 설정
shb03323 Jul 18, 2023
2d60512
feat: Supporter 의 VO 객체 생성
shb03323 Jul 18, 2023
23a46c8
feat: Supporter 생성 기능 구현
shb03323 Jul 18, 2023
37f8af6
feat: Runner null 예외 검증 구현
shb03323 Jul 18, 2023
cbbeb88
refactor: Runner, Supporter 외래키 nullable = false 로 설정
shb03323 Jul 18, 2023
0722985
feat: Title VO 구현
shb03323 Jul 18, 2023
016a21a
feat: Contents VO 구현
shb03323 Jul 18, 2023
b75f900
feat: PullRequestUrl VO 구현
shb03323 Jul 18, 2023
35b902d
refactor: Contents 타입 varchar 에서 text로 변경
shb03323 Jul 18, 2023
6e4e90b
feat: Deadline VO 구현
shb03323 Jul 18, 2023
1d6fc28
feat: WatchedCount VO 구현
shb03323 Jul 18, 2023
78765b4
feat: ChattingRoomCount VO 구현
shb03323 Jul 18, 2023
a2b698d
fix: 예외 메시지 분리
shb03323 Jul 18, 2023
35034d2
style: 클래스 명과 변수 사이 개행
shb03323 Jul 18, 2023
b1deaeb
feat: RunnerPost entity 생성
shb03323 Jul 18, 2023
653cb57
refactor: Member 이름 변수명 변경
shb03323 Jul 18, 2023
636c7ca
feat: TagName VO 구현
shb03323 Jul 18, 2023
01a1902
feat: TagCount VO 구현
shb03323 Jul 18, 2023
25c7caa
feat: Tag entity 생성
shb03323 Jul 18, 2023
bfaa2af
feat: RunnerPostTag entity 생성
shb03323 Jul 18, 2023
10e2d2d
feat: BaseEntity 적용
shb03323 Jul 18, 2023
1c908b2
feat: Entity JPA repository 구현
shb03323 Jul 18, 2023
fef75b2
feat: Cascade persist 옵션과 orphanRemoval 옵션 추가
shb03323 Jul 18, 2023
4e4ac38
feat: RunnerPost Controller 및 Service 뼈대 코드 작성
shb03323 Jul 18, 2023
c265e0c
test: RunnerPostTag 테스트 수정
shb03323 Jul 18, 2023
cc415ed
Merge remote-tracking branch 'team/dev/BE' into feat/9
shb03323 Jul 18, 2023
cdf6c84
refactor: gradle 빌드 파일 삭제
shb03323 Jul 18, 2023
7d8c854
docs: CI 스크립트 수정
shb03323 Jul 18, 2023
9bac249
refactor: gradle 빌드 파일 재생성
shb03323 Jul 18, 2023
b5a21f6
refactor: gradle 빌드 파일 재생성
shb03323 Jul 18, 2023
65245e9
docs: CI 스크립트 내의 프로젝트 빌드 파일 경로 수정
shb03323 Jul 18, 2023
b3dea13
Merge remote-tracking branch 'team/dev/BE' into feat/9
shb03323 Jul 18, 2023
815bc47
docs: CI 오류 확인
shb03323 Jul 18, 2023
cb5fd1b
Merge remote-tracking branch 'team/dev/BE' into feat/9
shb03323 Jul 18, 2023
68112ff
docs: CI gradlew 경로로 이동
shb03323 Jul 18, 2023
f385781
Merge remote-tracking branch 'team/dev/BE' into feat/9
shb03323 Jul 18, 2023
82aee9e
docs: CI 경로 한 run에 설정
shb03323 Jul 18, 2023
8590ed6
Merge remote-tracking branch 'team/dev/BE' into feat/9
shb03323 Jul 18, 2023
a07f284
docs: CI 성공
shb03323 Jul 18, 2023
258c802
스프링 기본 구조 설계 (#18)
shb03323 Jul 18, 2023
af680c2
feat: request dto 생성
shb03323 Jul 18, 2023
f20071e
feat: service 레이어 구현
shb03323 Jul 18, 2023
19ff721
style: 주석 추가
shb03323 Jul 18, 2023
9ba9315
feat: Controller 레이어 구현
shb03323 Jul 18, 2023
941f8bb
refactor: update 한 후에 id 받아오도록 수정
shb03323 Jul 18, 2023
962b242
test: update 성공 테스트 작성
shb03323 Jul 18, 2023
83406dd
refactor: Tag 에서 BaseEntity 제거
shb03323 Jul 19, 2023
a0d927a
feat: Tag 개수 증가 및 감소, 비교 로직 추가
shb03323 Jul 19, 2023
eedcf32
test: 테스트 displayName 변경
shb03323 Jul 19, 2023
1467abc
feat: 초기 tag 생성 기능 구현
shb03323 Jul 19, 2023
5bf9362
feat: 필드 update 기능 구현
shb03323 Jul 19, 2023
8fe5700
feat: request dto 에 LocalDateTime getter 생성
shb03323 Jul 19, 2023
0670824
feat: tag 이름으로 tag 조회 기능 구현
shb03323 Jul 19, 2023
6d4d03c
feat: id 로 RunnerPostTag 목록 조회 기능 구현
shb03323 Jul 19, 2023
eb73e0d
feat: 러너 게시글 수정 service 구현
shb03323 Jul 19, 2023
4af994c
refactor: dto 이름 변경
shb03323 Jul 19, 2023
8217275
refactor: equalsAndHashCode 적용
shb03323 Jul 19, 2023
a8c7607
test: service 테스트 작성
shb03323 Jul 19, 2023
fcbb738
Merge remote-tracking branch 'team/dev/BE' into feat/19
shb03323 Jul 19, 2023
d4c66a7
Merge branch 'feat/19' into dev/BE
shb03323 Jul 19, 2023
b480098
Revert "러너 게시글 수정 API 구현" (#36)
shb03323 Jul 19, 2023
6cc11fd
러너 게시글 등록 API 구현 (#30)
cookienc Jul 20, 2023
8e3dcfb
러너 게시글 상세 조회 및 삭제 API 구현 (#28)
hyena0608 Jul 20, 2023
bdcb1e9
러너 게시글 수정 API 구현 (#41)
shb03323 Jul 20, 2023
3ff18e2
러너 게시글 조회 API 구현 (#32)
eunbii0213 Jul 20, 2023
588c02b
리뷰 요청 글 전체 조회 API 수정, Tag이름 조회 수정 (#47)
eunbii0213 Jul 20, 2023
97b02d9
러너 포스트 중복 저장 시 발생하는 오류 해결 (#48)
cookienc Jul 20, 2023
5c6c9f7
러너 게시글 태그 중복 조회 오류 해결 (#51)
hyena0608 Jul 20, 2023
4f832d5
예외 메시지 반환을 위한 ErrorResponse 객체 생성 (#62)
hyena0608 Jul 23, 2023
1d97a16
러너 게시글 조회 객체 이름 수정 (#63)
eunbii0213 Jul 24, 2023
fd2c156
테스트 코드를 위한 Fixture 생성 및 RunnerPost 테이블에 status 칼럼 추가 (#74)
hyena0608 Jul 24, 2023
b779f86
RunnerPostTag에 FK 제약 조건 이름 수정 (#66)
cookienc Jul 25, 2023
d0828aa
나누어져있는 RunnerPostResponse 통합 (#78)
hyena0608 Jul 25, 2023
0d5dbbd
서포터 목록 조회 API 구현 version-test (#93)
shb03323 Jul 25, 2023
da01b5a
서포터 목록 조회 API 에서 별점 제거 (#96)
shb03323 Jul 25, 2023
58af9ef
러너 리뷰 요청 게시글 생성 version-test (#94)
cookienc Jul 26, 2023
0a37f3e
feat: 러너 게시글 조회 API 구현 version-test
eunbii0213 Jul 25, 2023
2b2546b
style: 주석 제거
eunbii0213 Jul 25, 2023
1fa497a
Profile에 isOwner 삭제하고 RunnerPostResponse에 isOwner 추가 (#104)
eunbii0213 Jul 26, 2023
dcbe6f8
Docker Hub와 GitHub self hosted runner를 이용한 CD 설정 (#106)
hyena0608 Jul 26, 2023
7dc319a
러너 게시글 상세 조회 API 구현 version-test (#109)
eunbii0213 Jul 26, 2023
9e55b40
Test Fixture 파라미터 타입 수정 (#110)
hyena0608 Jul 27, 2023
63b978d
클라이언트 예외를 위한 Validator 추가 (#117)
shb03323 Jul 27, 2023
8d2d732
CORS 설정 및 Profile을 RunnerProfile로 변경 (#120)
hyena0608 Jul 27, 2023
aed6525
환경 변수 보호를 위한 서브 모듈 연결 (#125)
shb03323 Jul 27, 2023
a130b7c
String 으로 된 Date 값을 LocalDateTime 으로 변경하는 컨버터 구현 (#127)
cookienc Jul 28, 2023
615f2b0
Merge pull request #130
hyena0608 Jul 28, 2023
6f3be06
백엔드 프로덕션 컨테이너 세팅 (#132)
hyena0608 Jul 28, 2023
56c0987
secret 파일 pull (#139)
shb03323 Jul 28, 2023
029f4f0
secret 파일 pull (#141)
shb03323 Jul 28, 2023
dfcb42e
secret 파일 pull (#142)
shb03323 Jul 28, 2023
cb02b5b
dev 환경에 방언 추가 (#143)
shb03323 Jul 28, 2023
47993d6
dev에 prod db 적용해보기 (#144)
shb03323 Jul 28, 2023
eeef22b
cicd 파일 및 환경 변수 원상복구 (#145)
shb03323 Jul 28, 2023
202b5a2
secret 변경 (#146)
shb03323 Jul 28, 2023
76e6df4
도커 secret 수정 (#147)
shb03323 Jul 28, 2023
e2f26e9
서포터 기술 태그 table 추가 (#151)
shb03323 Jul 31, 2023
955b06c
러너 게시글 조회할 때 조회수 증가 기능 구현 (#148)
hyena0608 Jul 31, 2023
162883b
docker network 설정 (#156)
shb03323 Jul 31, 2023
77b7eb3
fix: docker network 설정 (#158)
shb03323 Jul 31, 2023
5299586
cd 파일 재설정 (#160)
shb03323 Jul 31, 2023
7f166d9
Merge branch 'deploy' into dev/BE
shb03323 Jul 31, 2023
b1847af
프론트엔드 코드 삭제 (#167)
shb03323 Aug 1, 2023
974379d
서포터 전체 조회 기술 태그 목록 추가 version-test (#162)
eunbii0213 Aug 1, 2023
ed13e4c
CORS 환경별로 allowed origin 변경 (#169)
shb03323 Aug 1, 2023
48156f4
테스트 코드 Fixture 통일 (#172)
shb03323 Aug 1, 2023
dd13655
domain exception이 server exception을 상속받도록 수정 (#177)
eunbii0213 Aug 2, 2023
1e99043
dev 환경 변수 수정 (#188)
shb03323 Aug 3, 2023
38411e8
Github Social Login 4차 구현 (#164)
hyena0608 Aug 3, 2023
0618442
Oauth API prefix 수정 및 깃허브 소셜 로그인 Http Method 수정 (#193)
hyena0608 Aug 3, 2023
9f3bce1
서포터 피드백 등록 API 구현 (#186)
cookienc Aug 3, 2023
a163ab8
모든 도메인 객체 exception Notnull method 제거 (#184)
eunbii0213 Aug 3, 2023
7a15394
러너 본인 프로필 조회 기능 구현 (#183)
shb03323 Aug 3, 2023
afe83da
Member Email 값 객체를 SocialId 값 객체로 변경 (#196)
hyena0608 Aug 3, 2023
3efdaab
모든 API 인증 기능 추가 (#202)
shb03323 Aug 3, 2023
58e4ac2
클라이언트 에러 HttpStatus 수정 (#206)
hyena0608 Aug 3, 2023
f2b3352
게시글 최신순으로 정렬 (#207)
shb03323 Aug 3, 2023
3d00e4d
submodule 업데이트 (#212)
shb03323 Aug 4, 2023
e6ca60d
merge: 충돌 해결
shb03323 Aug 4, 2023
1ea4208
Oauth RedirectUrl, Claim, 서브 모듈 변경 (#219)
hyena0608 Aug 4, 2023
2c37261
merge: 충돌 해결
shb03323 Aug 4, 2023
5b1c0c0
전체 조회 쿼리 날짜 역순으로 정렬 (#227)
shb03323 Aug 4, 2023
a2186df
러너 게시글 상세 조회 시 조회수가 증가하도록 변경 (#230)
cookienc Aug 4, 2023
4b04c53
Deploy에서 쿼리 log을 삭제 (#249)
cookienc Aug 8, 2023
c93bc0b
엔티티 리팩터링 (#265)
shb03323 Aug 8, 2023
ccef650
Auth ArgumentResolver 익명 null 반환 변경 (#271)
hyena0608 Aug 9, 2023
4679e01
백엔드 CI/CD 스크립트 수정 (#282)
shb03323 Aug 9, 2023
5223c31
CI/CD container 타임존 설정 (#285)
shb03323 Aug 9, 2023
5667d48
TagCount 삭제 (#287)
cookienc Aug 9, 2023
3c5d214
Member, Runner, Supporter 별 AuthPrincipal 수정 및 추가 (#291)
hyena0608 Aug 9, 2023
556428d
dev 서버 CORS 및 Redirect URL 변경 (#293)
cookienc Aug 9, 2023
69f1c6b
오류나는 Dockerfile 수정 (#295)
shb03323 Aug 9, 2023
41a8766
Dockerfile 오류 해결 (#297)
shb03323 Aug 9, 2023
9ec71e3
서포터 프로필 조회 API 구현 (#298)
hyena0608 Aug 9, 2023
c4b39fc
로그인한 맴버 조회 API 구현 (#308)
shb03323 Aug 10, 2023
caccf41
러너 본인 프로필 조회 API 구현 (#310)
hyena0608 Aug 10, 2023
7671338
러너 프로필 조회 API 구현 (#311)
cookienc Aug 11, 2023
3ad7f10
서포터 프로필 변경 API (#315)
shb03323 Aug 11, 2023
6888e91
Dev에 allowed-origins에 localhost:3000을 추가 (#318)
cookienc Aug 11, 2023
d02d408
만들어진 restdocs 파일을 src/resources/static/docs/ 하위로 이동 (#329)
cookienc Aug 12, 2023
837403c
Runner profile 수정 API 구현 (#325)
eunbii0213 Aug 13, 2023
d953876
서포터의 리뷰 완료한 게시글 조회 API 구현 (#331)
hyena0608 Aug 13, 2023
e209776
서포터의 리뷰 제안 철회 API 구현 (#337)
shb03323 Aug 14, 2023
3aa6bfa
러너가 서포터 목록에서 서포터를 선택하는 API 구현 (#346)
cookienc Aug 14, 2023
2d41d5f
서포터가 러너 게시글 리뷰 신청 API 구현 (#340)
hyena0608 Aug 14, 2023
d2c291c
러너 게시글 삭제 API (#350)
shb03323 Aug 14, 2023
78a0813
서포터 본인 프로필 조회 API를 구현 (#345)
cookienc Aug 14, 2023
70c0d11
러너 게시글 상세 조회 API 리팩터링 (#343)
hyena0608 Aug 14, 2023
f5f8614
서포터가 본인이 리뷰한 게시글의 상태를 리뷰 완료로 변경하는 API 구현 (#347)
cookienc Aug 14, 2023
97a39a5
로그인한 서포터의 러너 게시글 조회 API 구현 (#342)
shb03323 Aug 14, 2023
8f32337
러너 게시글 생성 API 수정 (#348)
cookienc Aug 15, 2023
a5c31e8
Restdocs가 build 파일에 생성이 되지 않던 문제 수정 (#359)
cookienc Aug 15, 2023
1061c91
build.gradle에서 RESTDocs 파일 변수명 수정 (#361)
cookienc Aug 15, 2023
2fe31d5
build.gradle에서 RESTDocs 파일 변수명 수정 (#362)
cookienc Aug 15, 2023
5894dad
build.gradle에서 RESTDocs 파일 변수명 재수정 (#363)
cookienc Aug 15, 2023
213ea51
러너 게시글 상세 조회 서포터 리뷰 지원 유무 응답 추가 및 uri 수정 (#365)
hyena0608 Aug 16, 2023
8959876
러너 게시글 전체 조회 API 페이징 기능 추가 (#344)
eunbii0213 Aug 16, 2023
2919fd1
전역 예외 처리 및 로깅 (#378)
shb03323 Aug 16, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: All deploy CI + CD on push

on:
push:
branches: [ "deploy" ]
branches: [ "deploy/BE" ]

jobs:
deploy-ci-be:
runs-on: ubuntu-latest
deploy-ci:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
Expand Down Expand Up @@ -45,23 +45,8 @@ jobs:
- name: Docker Hub Push
run: docker push 2023batondeploy/2023-baton-deploy

deploy-ci-fe:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: 의존성을 설치한다
run: npm install

- name: 테스트를 수행한다
run: npm run test

deploy-cd-be:
needs: deploy-ci-be
deploy-cd:
needs: deploy-ci
runs-on: [self-hosted, Linux, ARM64, deploy]

steps:
Expand All @@ -77,4 +62,4 @@ jobs:

- name: Docker Compose
run: |
sudo docker run --name spring-baton -p 8080:8080 2023batondeploy/2023-baton-deploy:latest 1>> build.log 2>> error.log &
sudo docker run --name spring-baton -p 8080:8080 -e TZ=Asia/Seoul 2023batondeploy/2023-baton-deploy:latest 1>> build.log 2>> error.log &
7 changes: 2 additions & 5 deletions .github/workflows/deploy-be-ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ name: BE deploy CI on Pull Request

on:
pull_request:
branches: [ "deploy" ]

permissions:
contents: read
branches: [ "deploy/BE" ]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dev-be-ci-cd-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
Expand Down Expand Up @@ -62,4 +62,4 @@ jobs:

- name: Docker Compose
run: |
sudo docker run --name spring-baton --network=baton -p 8080:8080 2023baton/2023baton:latest 1>> build.log 2>> error.log &
sudo docker run --name spring-baton --network=baton -p 8080:8080 -e TZ=Asia/Seoul 2023baton/2023baton:latest 1>> build.log 2>> error.log &
5 changes: 1 addition & 4 deletions .github/workflows/dev-be-ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ on:
pull_request:
branches: [ "dev/BE" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions backend/baton/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,4 @@ gradle-app.setting

src/main/resources/application-deploy.yml
src/main/resources/application-dev.yml
src/main/resources/static/docs/**
2 changes: 1 addition & 1 deletion backend/baton/Dockerfile-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ WORKDIR /app

COPY ./build/libs/baton-0.0.1-SNAPSHOT.jar /app/baton.jar

CMD ["java", "-jar", "-Dspring.profiles.active=deploy", "baton.jar"]
CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "-Dspring.profiles.active=deploy", "baton.jar"]
2 changes: 1 addition & 1 deletion backend/baton/Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ WORKDIR /app

COPY ./build/libs/baton-0.0.1-SNAPSHOT.jar /app/baton.jar

CMD ["java", "-jar", "-Dspring.profiles.active=dev", "baton.jar"]
CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "-Dspring.profiles.active=dev", "baton.jar"]
47 changes: 45 additions & 2 deletions backend/baton/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ java {

configurations {
asciidoctorExt
configureEach {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
}

configurations {
Expand All @@ -29,31 +32,50 @@ repositories {

ext {
set('snippetsDir', file("build/generated-snippets"))
set('restDocsCopyFrom', file("build/docs/asciidoc/index.html"))
set('restDocsCopyIntoBuild', file("build/resources/main/static/docs"))
set('restDocsCopyIntoLocal', file("src/main/resources/static/docs"))
}

dependencies {
// spring starter
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-aop:3.1.1'

// flyway
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-mysql'

// jwt
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'

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

// database
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'

// log
implementation 'org.springframework.boot:spring-boot-starter-log4j2'

// docker
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
annotationProcessor 'org.projectlombok:lombok'

// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.rest-assured:rest-assured'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.testcontainers:mysql'

asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
}

Expand All @@ -73,5 +95,26 @@ tasks.register('copySecret', Copy) {
tasks.named('asciidoctor') {
inputs.dir snippetsDir
configurations 'asciidoctorExt'
sources {
include("**/index.adoc")
}
baseDirFollowsSourceFile()
dependsOn test
}

asciidoctor.doFirst {
delete file(restDocsCopyFrom)
}

task copyDocument(type: Copy) {
dependsOn asciidoctor
from file(restDocsCopyFrom)
into file(restDocsCopyIntoLocal)
into file(restDocsCopyIntoBuild)
}

tasks.named('resolveMainClassName') {
inputs.files(tasks.named('copyDocument'))
}

bootJar.dependsOn('copyDocument')
2 changes: 1 addition & 1 deletion backend/baton/secret
31 changes: 31 additions & 0 deletions backend/baton/src/docs/asciidoc/MemberLoginProfileReadApi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ifndef::snippets[]
:snippets: ../../../build/generated-snippets
endif::[]
:doctype: book
:icons: font
:source-highlighter: highlight.js
:toc: left
:toclevels: 3
:sectlinks:
:operation-http-request-title: Example Request
:operation-http-response-title: Example Response

=== *로그인된 사용자 프로필 조회*

==== *로그인된 사용자 프로필 조회 API*

===== *Http Request*

include::{snippets}/../../build/generated-snippets/member-read-with-logined-member-api-test/read-login-member-by-access-token/http-request.adoc[]

===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/member-read-with-logined-member-api-test/read-login-member-by-access-token/request-headers.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/member-read-with-logined-member-api-test/read-login-member-by-access-token/http-response.adoc[]

===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/member-read-with-logined-member-api-test/read-login-member-by-access-token/response-fields.adoc[]
31 changes: 31 additions & 0 deletions backend/baton/src/docs/asciidoc/RunnerLoginProfileReadApi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ifndef::snippets[]
:snippets: ../../../build/generated-snippets
endif::[]
:doctype: book
:icons: font
:source-highlighter: highlight.js
:toc: left
:toclevels: 3
:sectlinks:
:operation-http-request-title: Example Request
:operation-http-response-title: Example Response

=== *로그인된 러너 프로필 조회*

==== *로그인된 러너 마이페이지 프로필 조회 API*

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-read-with-logined-runner-api-test/read-my-profile-by-token/http-request.adoc[]

===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/runner-read-with-logined-runner-api-test/read-my-profile-by-token/request-headers.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-read-with-logined-runner-api-test/read-my-profile-by-token/http-response.adoc[]

===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/runner-read-with-logined-runner-api-test/read-my-profile-by-token/response-fields.adoc[]
27 changes: 27 additions & 0 deletions backend/baton/src/docs/asciidoc/RunnerPostCreateApi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ifndef::snippets[]
:snippets: ../../../build/generated-snippets
endif::[]
:doctype: book
:icons: font
:source-highlighter: highlight.js
:toc: left
:toclevels: 3
:sectlinks:
:operation-http-request-title: Example Request
:operation-http-response-title: Example Response

=== *러너 게시글 생성*

==== *러너 게시글 생성 API*

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post/http-request.adoc[]

===== *Http Request Header*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post/request-headers.adoc[]

===== *Http Response Header*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post/response-headers.adoc[]
39 changes: 39 additions & 0 deletions backend/baton/src/docs/asciidoc/RunnerPostCreateReadApi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
ifndef::snippets[]
:snippets: ../../../build/generated-snippets
endif::[]
:doctype: book
:icons: font
:source-highlighter: highlight.js
:toc: left
:toclevels: 3
:sectlinks:
:operation-http-request-title: Example Request
:operation-http-response-title: Example Response

=== *러너 게시글 생성 API*

==== *러너 게시글에 서포터 리뷰 지원 API*

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post-applicant/http-request.adoc[]

===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post-applicant/request-headers.adoc[]

===== *Http Request Path Parameters*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post-applicant/path-parameters.adoc[]

===== *Http Request Fields*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post-applicant/request-fields.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post-applicant/http-response.adoc[]

===== *Http Response Headers*

include::{snippets}/../../build/generated-snippets/runner-post-create-api-test/create-runner-post-applicant/response-headers.adoc[]
27 changes: 27 additions & 0 deletions backend/baton/src/docs/asciidoc/RunnerPostDeleteApi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ifndef::snippets[]
:snippets: ../../../build/generated-snippets
endif::[]
:doctype: book
:icons: font
:source-highlighter: highlight.js
:toc: left
:toclevels: 3
:sectlinks:
:operation-http-request-title: Example Request
:operation-http-response-title: Example Response

=== *러너 게시글 삭제*

==== *러너 게시글 삭제 API*

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-post-delete-api-test/delete-by-runner-post-id/http-request.adoc[]

===== *Http Request Path Parameters*

include::{snippets}/../../build/generated-snippets/runner-post-delete-api-test/delete-by-runner-post-id/path-parameters.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-post-delete-api-test/delete-by-runner-post-id/http-response.adoc[]
Loading