From eeec6e9b86c75a23b08a1f6be6138b62eefdbb4c Mon Sep 17 00:00:00 2001 From: Adithya Sv Date: Thu, 18 Jul 2024 01:51:19 +0530 Subject: [PATCH 1/5] remove sonar key --- pom.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pom.xml b/pom.xml index b0a738b..50b389a 100644 --- a/pom.xml +++ b/pom.xml @@ -15,9 +15,6 @@ Demo project for Spring Boot Reactive Kafka 22 - - sqa_2f70116c60ac93aaf18eb362f6091ed705041c7a - From c708cc49e972aade58a1dc9dd27a0579ce7f222e Mon Sep 17 00:00:00 2001 From: Adithya Sv Date: Thu, 18 Jul 2024 01:56:26 +0530 Subject: [PATCH 2/5] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1660c67..31acb3a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,4 +38,5 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=com.kafka.learn:kafkaStudy -Dsonar.projectName='KafkaStudy' + run: mvn clean verify sonar:sonar -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }} + From a6b1c6f8b80413e0f14d5fc370b4ed85d7ec9580 Mon Sep 17 00:00:00 2001 From: Adithya Sv Date: Thu, 18 Jul 2024 02:02:52 +0530 Subject: [PATCH 3/5] Adding organization --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 31acb3a..ab067f4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,5 +38,5 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn clean verify sonar:sonar -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }} + run: mvn clean verify sonar:sonar -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.organization={{ secrets.SONAR_PROJECT_ORG }} From 67198ff5a99381b4353f374d78337e2241726466 Mon Sep 17 00:00:00 2001 From: Adithya Sv Date: Thu, 18 Jul 2024 02:21:50 +0530 Subject: [PATCH 4/5] Update pom.xml --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index 50b389a..4f9f3b3 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,8 @@ Demo project for Spring Boot Reactive Kafka 22 + kafkastudy + https://sonarcloud.io From f732791ff44efb0eef520a351e552e49dc08ca2b Mon Sep 17 00:00:00 2001 From: SVAdithya Date: Thu, 18 Jul 2024 02:28:26 +0530 Subject: [PATCH 5/5] sonar fix --- .github/workflows/main.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab067f4..1ea91a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,5 @@ -name: Build +name: SonarCloud on: push: branches: @@ -18,18 +18,18 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Set up JDK 22 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'temurin' # or 'adopt', depending on your preference java-version: '22' - - name: Cache SonarQube packages - uses: actions/cache@v1 + - name: Cache SonarCloud packages + uses: actions/cache@v3 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache Maven packages - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} @@ -37,6 +37,4 @@ jobs: - name: Build and analyze env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn clean verify sonar:sonar -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.organization={{ secrets.SONAR_PROJECT_ORG }} - + run: mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=SVAdithya_KafkaStudy