diff --git a/Jenkinsfile b/Jenkinsfile index cb4582a2d..131b0604e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,4 +19,9 @@ node { stage('Publish artifacts') { sh "./gradlew publish" } + stage('SonarQube') { + withCredentials([string(credentialsId: 'SONAR_TOKEN', variable: 'SONAR_TOKEN')]) { + sh "./gradlew sonarqube -Dsonar.login=$SONAR_TOKEN" + } + } } diff --git a/build.gradle b/build.gradle index 96157b442..66896e406 100755 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,10 @@ buildscript { } } +plugins { + id "org.sonarqube" version "3.0" +} + repositories { maven { url = "https://dvs1.progwml6.com/files/maven/" @@ -18,6 +22,14 @@ repositories { } } +sonarqube { + properties { + property "sonar.projectKey", "refinedmods_refinedstorage" + property "sonar.organization", "refinedmods" + property "sonar.host.url", "https://sonarcloud.io" + } +} + apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish'