Skip to content

Commit d797cd9

Browse files
committed
fix: sonarqube 설정 오류 수정
1 parent d1fe12b commit d797cd9

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/cicd.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ jobs:
7575
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} \
7676
-Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} \
7777
-Dsonar.host.url=https://sonarcloud.io \
78-
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
79-
--info
78+
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
79+
-Dsonar.gradle.skipCompile=true \
80+
-Dsonar.qualitygate.wait=false \
81+
--info --stacktrace
8082
continue-on-error: true
8183

8284
# 3단계: 빌드 (테스트 제외)

build.gradle

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ sonar {
4646
property "sonar.host.url", "https://sonarcloud.io"
4747

4848

49-
// 컴파일 skip 설정 (경고 해결)
49+
// 컴파일 skip 설정
5050
property "sonar.gradle.skipCompile", "true"
51+
property "sonar.qualitygate.wait", "false"
52+
property "sonar.scanner.force-deprecated-java-version", "false"
53+
5154

5255
// 소스 코드 경로 설정
5356
property "sonar.sources", "src/main/java"
@@ -91,8 +94,6 @@ sonar {
9194
"**/notification/**/*"
9295
].join(",")
9396

94-
// Quality Gate 설정
95-
property "sonar.qualitygate.wait", "false"
9697

9798
// 언어 및 인코딩
9899
property "sonar.java.source", "21"
@@ -232,6 +233,17 @@ tasks.named('jacocoTestCoverageVerification') {
232233
// SonarQube 태스크 의존성 설정 (최신 API)
233234
tasks.named('sonar') {
234235
dependsOn tasks.compileJava, tasks.compileTestJava, tasks.test, tasks.jacocoTestReport
236+
237+
if (tasks.findByName('test')) {
238+
dependsOn tasks.test, tasks.jacocoTestReport
239+
}
240+
241+
doFirst {
242+
println "🔍 SonarCloud 분석 시작..."
243+
println "프로젝트: INU-Software-Design_Software-Design-BE"
244+
println "조직: inu-software-design"
245+
}
246+
235247
}
236248

237249
// 커스텀 태스크들 (최신 Task API 사용)

0 commit comments

Comments
 (0)