From 96703840b690073c6e9e9356be79546d9ef6f2b1 Mon Sep 17 00:00:00 2001 From: Johannes Schnatterer Date: Tue, 24 Jul 2018 08:51:16 +0200 Subject: [PATCH] #1 Jenkins: Trigger SonarQube via ces-build-lib --- Jenkinsfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e119818df..a51fa0e54 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ #!groovy -@Library('github.com/cloudogu/ces-build-lib@9bcafcb') +@Library('github.com/cloudogu/ces-build-lib@68e7f52') import com.cloudogu.ces.cesbuildlib.* properties([ @@ -43,12 +43,10 @@ node { ) stage('SonarQube Analysis') { - withCredentials([usernamePassword(credentialsId: credentialsId, - passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) { - //noinspection GroovyAssignabilityCheck - mvn "org.codehaus.mojo:sonar-maven-plugin:3.2:sonar -Dsonar.host.url=${cesUrl}/sonar " + - "-Dsonar.login=${USERNAME} -Dsonar.password=${PASSWORD} -Dsonar.exclusions=target/**" - } + + def sonarQube = new SonarQube(this, [usernamePassword: credentialsId, sonarHostUrl: "${cesUrl}/sonar"]) + + sonarQube.analyzeWith(mvn) } stage('Deploy Artifacts') {