From 3d877a7ffd56e4c6cef010e2f72d0a6caf47127b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=80=ED=9B=88?= Date: Sun, 14 Dec 2025 23:42:38 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20sonarcloud=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EB=B0=8F=20yml=EC=B6=94=EA=B0=80=20#2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sonarcloud.yml | 43 ++++++++++++++++++++++++++++++++ build.gradle | 9 +++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000..b61bf34 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,43 @@ +name: SonarCloud Analysis + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - main + - develop + +jobs: + sonarcloud: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Cache SonarCloud packages + uses: actions/cache@v3 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./gradlew sonar --info \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2c73181..29544bd 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id 'org.springframework.boot' version '3.5.7' id 'io.spring.dependency-management' version '1.1.7' id 'com.diffplug.spotless' version '6.22.0' + id 'org.sonarqube' version '4.4.1.3373' } group = 'org.hanseiro' @@ -15,6 +16,14 @@ java { } } +sonar { + properties { + property 'sonar.projectKey', 'Hansei-ro_hanseiro-server' + property 'sonar.organization', 'hansei-ro' + property 'sonar.host.url', 'https://sonarcloud.io' + } +} + repositories { mavenCentral() } From 325d3f80cfbecc4e9318eefdbef06b8adcdd893c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=80=ED=9B=88?= Date: Sun, 14 Dec 2025 23:58:17 +0900 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20sonarcloud.yml=20=EC=9B=8C?= =?UTF-8?q?=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EB=B8=8C=EB=9E=9C?= =?UTF-8?q?=EC=B9=98=20=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD=20#2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sonarcloud.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index b61bf34..10c34fe 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -5,8 +5,8 @@ on: types: [opened, synchronize, reopened] push: branches: - - main - - develop + - master + - dev jobs: sonarcloud: From 4445506338ea592cbfb7ae2055f3aca87882f9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=80=ED=9B=88?= Date: Mon, 15 Dec 2025 00:06:10 +0900 Subject: [PATCH 3/4] =?UTF-8?q?chore:=20sonarcloud=20=EB=B2=84=EC=A0=84?= =?UTF-8?q?=EC=9D=B4=20gradle=208=EB=B2=84=EC=A0=84=EA=B3=BC=20=EB=A7=9E?= =?UTF-8?q?=EC=A7=80=EC=95=8A=EC=95=84=20=EB=B3=80=EA=B2=BD=20#2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 29544bd..215358d 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'org.springframework.boot' version '3.5.7' id 'io.spring.dependency-management' version '1.1.7' id 'com.diffplug.spotless' version '6.22.0' - id 'org.sonarqube' version '4.4.1.3373' + id 'org.sonarqube' version '5.1.0.4882' } group = 'org.hanseiro' From 058fd3773ee52a7386d528369ef1291222421277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A7=80=ED=9B=88?= Date: Mon, 15 Dec 2025 00:13:55 +0900 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20Gradle=208.10=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=8B=A4=EC=9A=B4=EA=B7=B8=EB=A0=88=EC=9D=B4=EB=93=9C=20#2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 23449a2..9355b41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME