From 1439dcdb5e566d8f3dfaa89448d7732c87aeb323 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 10 Mar 2018 17:02:25 +0000 Subject: [PATCH] jenkins: check code with sonarqube --- Jenkinsfile.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index 268e49c..298e7de 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -24,7 +24,9 @@ pipeline { when { expression { findFiles(glob: '**/src/main/java/*.java').length > 0 } } steps { withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') { - sh "${mvn} compile checkstyle:checkstyle pmd:pmd" + withSonarQubeEnv('sonarqube') { + sh "${mvn} compile checkstyle:checkstyle pmd:pmd org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar" + } } pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: '' }