#1 Jenkins: Trigger SonarQube via ces-build-lib

This commit is contained in:
Johannes Schnatterer 2018-07-24 08:51:16 +02:00
parent cd65c32c2e
commit 96703840b6

12
Jenkinsfile vendored
View file

@ -1,5 +1,5 @@
#!groovy #!groovy
@Library('github.com/cloudogu/ces-build-lib@9bcafcb') @Library('github.com/cloudogu/ces-build-lib@68e7f52')
import com.cloudogu.ces.cesbuildlib.* import com.cloudogu.ces.cesbuildlib.*
properties([ properties([
@ -43,12 +43,10 @@ node {
) )
stage('SonarQube Analysis') { stage('SonarQube Analysis') {
withCredentials([usernamePassword(credentialsId: credentialsId,
passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) { def sonarQube = new SonarQube(this, [usernamePassword: credentialsId, sonarHostUrl: "${cesUrl}/sonar"])
//noinspection GroovyAssignabilityCheck
mvn "org.codehaus.mojo:sonar-maven-plugin:3.2:sonar -Dsonar.host.url=${cesUrl}/sonar " + sonarQube.analyzeWith(mvn)
"-Dsonar.login=${USERNAME} -Dsonar.password=${PASSWORD} -Dsonar.exclusions=target/**"
}
} }
stage('Deploy Artifacts') { stage('Deploy Artifacts') {