From 2c23f39c8686fd86990a651c84ca2fae349a5ebd Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 28 Aug 2023 14:20:33 +0300 Subject: [PATCH] feat: leave default SonarQube properties intact, allow overriding via command-line arguments for GitHub actions --- .github/workflows/run_tests.yaml | 2 +- src/build.gradle | 6 +++--- src/gradle.properties | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index df677e4600..81da25971f 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -45,7 +45,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} working-directory: ./src - run: ./gradlew -Dorg.gradle.jvmargs=-Xmx6g -PxroadBuildType=RELEASE --stacktrace build sonar test intTest runProxyTest runMetaserviceTest runProxymonitorMetaserviceTest jacocoTestReport dependencyCheckAggregate -Pfrontend-npm-audit + run: ./gradlew -Dorg.gradle.jvmargs=-Xmx6g -PsonarqubeHost=https://sonarcloud.io -PsonarqubeProjectKey=nordic-institute_X-Road -PsonarqubeOrganization=nordic-institute -PxroadBuildType=RELEASE --stacktrace build sonar test intTest runProxyTest runMetaserviceTest runProxymonitorMetaserviceTest jacocoTestReport dependencyCheckAggregate -Pfrontend-npm-audit - name: Test report env: NODE_OPTIONS: '--max-old-space-size=6144' diff --git a/src/build.gradle b/src/build.gradle index f32cb777f7..01e0752d45 100644 --- a/src/build.gradle +++ b/src/build.gradle @@ -26,9 +26,9 @@ repositories { sonarqube { properties { - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.projectKey", "nordic-institute_X-Road" - property "sonar.organization", "nordic-institute" + property "sonar.host.url", "${sonarqubeHost}" + property "sonar.projectKey", "${sonarqubeProjectKey}" + property "sonar.organization", "${sonarqubeOrganization}" property "sonar.projectName", "X-Road" property "sonar.projectDescription", "Data Exchange Layer" property "sonar.projectVersion", xroadVersion diff --git a/src/gradle.properties b/src/gradle.properties index 3a67d5f62c..c5fdd2b04d 100644 --- a/src/gradle.properties +++ b/src/gradle.properties @@ -3,6 +3,11 @@ org.gradle.jvmargs=-Xmx1024m xroadVersion=7.4.0 xroadBuildType=SNAPSHOT +# SonarQube defaults +sonarqubeHost=https://sonarqube.niis.org +sonarqubeProjectKey=xroad +sonarqubeOrganization= + # common dependency versions akkaVersion=2.13:2.6.20 scalaLibraryVersion=2.13.10