Add SonarQube stage to Jenkins pipeline
This commit is contained in:
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
build.gradle
12
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'
|
||||
|
Reference in New Issue
Block a user