Add SonarQube stage to Jenkins pipeline

This commit is contained in:
raoulvdberge
2020-10-16 20:54:15 +02:00
parent e08cc845a2
commit 34c7deffd3
2 changed files with 17 additions and 0 deletions

5
Jenkinsfile vendored
View File

@@ -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"
}
}
}

View File

@@ -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'