From 836f2c550489b5c31e5107f9bb1356da5459eb49 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 6 Mar 2018 22:21:24 +0000 Subject: [PATCH] jenkins: codacy: add coverage-reporter --- Jenkinsfile.groovy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index 5b711b4..ef372a4 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -37,6 +37,13 @@ pipeline { steps { junit '**/target/surefire-reports/*.xml' jacoco exclusionPattern: '**/*{Test|IT|Main|Application|Immutable}.class' + withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') { + sh "${mvn} com.gavinmogan:codacy-maven-plugin:coverage " + + "-DcoverageReportFile=target/site/jacoco/jacoco.xml " + + "-DprojectToken=`$JENKINS_HOME/codacy/token` " + + "-DapiToken=`$JENKINS_HOME/codacy/apitoken` " + + "-Dcommit=`git rev-parse HEAD`" + } } } stage('Archiving') {