Skip to content

Commit 81e0296

Browse files
committed
feat: sonarCloud 도입을 위한 의존성 추가, workflow 수정
- sonarcloud를 위한 의존성을 build.gradle에 추가 - CI시 자동 분석을 위한 CI.yml 파일 수정
1 parent 34eff56 commit 81e0296

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.github/workflows/CI.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,10 @@ jobs:
7272
title: updated_title,
7373
state: 'closed'
7474
})
75+
76+
77+
- name: Build and analyze
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
80+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
81+
run: ./gradlew build sonar --info

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id 'java'
33
id 'org.springframework.boot' version '3.3.5'
44
id 'io.spring.dependency-management' version '1.1.6'
5+
id "org.sonarqube" version "5.1.0.4882"
56
}
67

78
group = 'com'
@@ -23,6 +24,15 @@ repositories {
2324
mavenCentral()
2425
}
2526

27+
28+
sonar {
29+
properties {
30+
property "sonar.projectKey", "prgrms-web-devcourse-final-project_WEB1_1_Bongdari_BE"
31+
property "sonar.organization", "prgrms-web-devcourse-final-project"
32+
property "sonar.host.url", "https://sonarcloud.io"
33+
}
34+
}
35+
2636
dependencies {
2737

2838
// Data Layer: JPA, Redis, Database Drivers

src/main/resources/application.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ spring:
1515
generate_statistics: true
1616
show-sql: true
1717

18-
#swagger ??
18+
19+
#swagger
1920
springdoc:
2021
swagger-ui:
2122
groups-order: DESC

0 commit comments

Comments
 (0)