From 4648a96a351b2dd85eb750f7e8253b857855b50c Mon Sep 17 00:00:00 2001 From: Vic Romero Date: Fri, 25 Mar 2022 11:45:05 -0600 Subject: [PATCH] Configuring SonarQube using only the sonarqube.yml file Configuring SonarQube using only the sonarqube.yml file Configuring SonarQube using only the sonarqube.yml file Configuring SonarQube using only the sonarqube.yml file Configuring SonarQube using only the sonarqube.yml file Configuring SonarQube using only the sonarqube.yml file Configuring SonarQube using only the sonarqube.yml file Configuring SonarQube using only the sonarqube.yml file Changes have been done for making the GitHub actions flexible to push changes to the upstream Apache Fineract --- .github/workflows/sonarqube.yml | 8 +++++--- .gitignore | 2 +- build.gradle | 8 +------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index af4fde7f1..450bc94eb 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -6,9 +6,11 @@ jobs: runs-on: ubuntu-20.04 env: TZ: Asia/Kolkata - SONAR_ORGANIZATION: apache - SONAR_HOST_URL: https://sonarcloud.io + SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }} + SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Set up cache uses: actions/cache@v3 @@ -29,4 +31,4 @@ jobs: - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1 - name: Sonarqube - run: ./gradlew --no-daemon --console=plain -Dsonar.verbose=true -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.organization=$SONAR_ORGANIZATION --info -x rat -x test -x spotbugsMain -x spotbugsTest -x spotbugsGenerated -x licenseMain -x licenseTest -x checkstyleMain -x checkstyleTest --info --stacktrace build sonarqube + run: ./gradlew --no-daemon --console=plain -Dsonar.verbose=true -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.projectKey=$SONAR_PROJECT_KEY --info -x rat -x test -x spotbugsMain -x spotbugsTest -x spotbugsGenerated -x licenseMain -x licenseTest -x checkstyleMain -x checkstyleTest --info --stacktrace build sonarqube diff --git a/.gitignore b/.gitignore index 0ae3f4373..d69540d04 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,4 @@ bin/ fineract-provider/out/ fineract-provider/config/swagger/config.json fineract-provider/config/swagger/fineract-input.yaml -licenses +licenses \ No newline at end of file diff --git a/build.gradle b/build.gradle index aceebaf98..85d70129a 100644 --- a/build.gradle +++ b/build.gradle @@ -241,13 +241,7 @@ allprojects { } } - // Configuration for the sonarqube plugin - // https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-gradle/ - sonarqube { - properties { - property "sonar.projectKey", "apache_fineract" - } - } + // Configuration for the sonarqube plugin is now in GitHub Actions // Configuration for the spotless plugin // https://github.com/diffplug/spotless/tree/main/plugin-gradle