Skip to content

Commit

Permalink
feat: leave default SonarQube properties intact, allow overriding via
Browse files Browse the repository at this point in the history
command-line arguments for GitHub actions
  • Loading branch information
raits committed Aug 28, 2023
1 parent 9f0a4b8 commit 2c23f39
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions src/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c23f39

Please sign in to comment.