Skip to content

Commit

Permalink
YEL-139 [merge] 실서버 배포
Browse files Browse the repository at this point in the history
YEL-139 [merge] 실서버 배포
  • Loading branch information
devkwonsehoon authored Aug 27, 2023
2 parents 88bbfc3 + f3327bf commit d8f0766
Show file tree
Hide file tree
Showing 172 changed files with 21,206 additions and 975 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
shell: bash

- name: 🐘 Gradle로 빌드 실행
run: ./gradlew build -x test
run: ./gradlew build

- name: 💡 배포 상태를 Slack을 통해 전송합니다.
uses: rtCamp/action-slack-notify@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
shell: bash

- name: 🐘 Gradle로 빌드 실행
run: ./gradlew build -x test
run: ./gradlew build

- name: 📦 배포를 진행하기 위한 .zip 파일을 생성합니다.
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
shell: bash

- name: 🐘 Gradle로 빌드 실행
run: ./gradlew build -x test
run: ./gradlew build

- name: 📦 배포를 진행하기 위한 .zip 파일을 생성합니다.
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ on:
branches: [ "develop", "staging" ]

permissions:
contents: write
checks: write
id-token: write
pull-requests: write

jobs:
build:
Expand Down Expand Up @@ -52,7 +51,7 @@ jobs:
run: ./gradlew test

- name: 💬 테스트 결과를 코멘트로 등록합니다.
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: '**/build/test-results/test/TEST-*.xml'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ firebase*.json

### monitoring ###
monitoring/prometheus/volume
monitoring/grafana
monitoring/grafana
124 changes: 74 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
buildscript {
ext {
queryDslVersion = "5.0.0"
}
}

plugins {
id 'java'
id 'org.springframework.boot' version '2.7.4'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
id "org.asciidoctor.jvm.convert" version "3.3.2"
id 'jacoco'
}

group = 'com.yello'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

ext {
snippetsDir = file('build/generated-snippets')
}

java {
sourceCompatibility = '17'
test {
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
outputs.dir snippetsDir
}

configurations {
asciidoctorExt
compileOnly {
extendsFrom annotationProcessor
}
Expand All @@ -32,31 +35,23 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.4.2'

// JPA & Database
// Repositories
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'

implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.amqp:spring-rabbit:2.3.12'

runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j:8.0.31'

// Validations
implementation 'org.springframework.boot:spring-boot-starter-validation'

// Health Check
implementation 'org.springframework.boot:spring-boot-starter-actuator'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'


// JWT
implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2'


// Swagger
implementation 'org.springdoc:springdoc-openapi-ui:1.5.4'

// p6spy
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.7'

Expand All @@ -67,20 +62,9 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.79.Final:osx-aarch_64'


// QueryDSL
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}"
implementation "com.querydsl:querydsl-apt:${queryDslVersion}"

runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j:8.0.31'

// FCM
implementation 'com.google.firebase:firebase-admin:9.2.0'

// rabbitmq
implementation 'org.springframework.amqp:spring-rabbit:2.3.12'

// slack-webhook
implementation "net.gpedro.integrations.slack:slack-webhook:1.4.0"

Expand All @@ -90,32 +74,72 @@ dependencies {

// gson
implementation 'com.google.code.gson:gson:2.10.1'
}

tasks.named('test') {
useJUnitPlatform()
// Testing
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.4.2'
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.springframework.security:spring-security-test'
}

asciidoctor {
inputs.dir snippetsDir
configurations 'asciidoctorExt'
dependsOn test
}

def querydslDir = "$buildDir/generated/querydsl"

querydsl {
jpa = true
querydslSourcesDir = querydslDir
asciidoctor.doFirst {
delete file('src/docs/asciidocs')
}
sourceSets {
main.java.srcDir querydslDir

bootJar {
dependsOn asciidoctor
copy {
from asciidoctor.outputDir
into "src/main/resources/static/docs"
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
}
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}

jar {
enabled = false
}
jar.enabled = false

jacoco.toolVersion = "0.8.7"
jacocoTestReport {
reports {
xml.enabled false
csv.enabled true
html.enabled true

csv.destination file("${buildDir}/jacoco/index.csv")
html.destination file("${buildDir}/jacoco/index.html")
}
// finalizedBy 'jacocoTestCoverageVerification'
}
//jacocoTestCoverageVerification {
// violationRules {
// rule {
// enabled = true
// element = 'CLASS'
//
// limit {
// counter = 'METHOD'
// value = 'COVEREDRATIO'
// minimum = 0.60
// }
//
// limit {
// counter = 'INSTRUCTION'
// value = 'COVEREDRATIO'
// minimum = 0.60
// }
//
// excludes = ["*.dto", "*.dto.*", "*.ServerApplication", "*.configuration.*", "*.security.*", "*.exception.*", "*.util.*"]
// }
// }
//}
13 changes: 13 additions & 0 deletions src/docs/asciidoc/add-friend.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== 친구 추가하기

=== 요청

include::{snippets}/api/v1/friend/addFriend/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/friend/addFriend/path-parameters.adoc[]

=== 응답

include::{snippets}/api/v1/friend/addFriend/http-response.adoc[]
29 changes: 29 additions & 0 deletions src/docs/asciidoc/apple.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
== Apple 구독 구매 검증하기

=== 요청

include::{snippets}/api/v1/purchase/verifyAppleSubscriptionTransaction/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/purchase/verifyAppleSubscriptionTransaction/http-response.adoc[]

== Apple 열람권 구매 검증하기

=== 요청

include::{snippets}/api/v1/purchase/verifyAppleTicketTransaction/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/purchase/verifyAppleTicketTransaction/http-response.adoc[]

== Apple 환불하기

=== 요청

include::{snippets}/api/v1/purchase/refundInAppApple/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/purchase/refundInAppApple/http-response.adoc[]
13 changes: 13 additions & 0 deletions src/docs/asciidoc/check-keyword.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== 투표 키워드 확인하기

=== 요청

include::{snippets}/api/v1/vote/checkKeyword/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/vote/checkKeyword/path-parameters.adoc[]

=== 응답

include::{snippets}/api/v1/vote/checkKeyword/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/check-user-by-id.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 유저 정보 조회하기

=== 요청

include::{snippets}/api/v1/user/findUserById/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/user/findUserById/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/check-user.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 내 정보 조회하기

=== 요청

include::{snippets}/api/v1/user/findUser/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/user/findUser/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/check-vote-available.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 투표 가능 여부 조회

=== 요청

include::{snippets}/api/v1/vote/checkVoteAvailable/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/vote/checkVoteAvailable/http-response.adoc[]
10 changes: 10 additions & 0 deletions src/docs/asciidoc/create-vote.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
== 투표 생성하기

=== 요청

include::{snippets}/api/v1/vote/createVote/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/vote/createVote/http-response.adoc[]

13 changes: 13 additions & 0 deletions src/docs/asciidoc/delete-friend.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== 친구 삭제하기

=== 요청

include::{snippets}/api/v1/friend/deleteFriend/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/friend/deleteFriend/path-parameters.adoc[]

=== 응답

include::{snippets}/api/v1/friend/deleteFriend/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/delete-user.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 유저 탈퇴하기

=== 요청

include::{snippets}/api/v1/user/deleteUser/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/user/deleteUser/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/device-token.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 디바이스 토큰 수정하기

=== 요청

include::{snippets}/api/v1/user/updateUserDeviceToken/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/user/updateUserDeviceToken/http-response.adoc[]
13 changes: 13 additions & 0 deletions src/docs/asciidoc/find-friend-votes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== 친구 투표 전체 조회

=== 요청

include::{snippets}/api/v1/vote/findAllFriendVotes/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/vote/findAllFriendVotes/request-parameters.adoc[]

=== 응답

include::{snippets}/api/v1/vote/findAllFriendVotes/http-response.adoc[]
Loading

0 comments on commit d8f0766

Please sign in to comment.