From 4fc50c482f134a140cd3fc57cdbc9261f8e912ee Mon Sep 17 00:00:00 2001 From: Alex Baptista Date: Fri, 1 Dec 2017 19:51:30 -0200 Subject: [PATCH] include sonarqube step --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff005bfeb..39a7f9b0c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,12 +5,16 @@ node('Slave_AWS'){ } stage('Build') { - sh 'docker run --rm --name build_maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app;mvn clean install"' + //sh 'docker run --rm --name build_maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app;mvn clean install"' } stage('Unit Test') { junit 'target/surefire-reports/*.xml' } + stage('Sonarqube') + { + docker run --rm --name maven -v $(pwd):/app docker.io/maven:alpine bash -c "cd app; mvn clean install cobertura:cobertura -Dcobertura.report.format=xml sonar:sonar -Dsonar.host.url=http://34.205.24.188:9000" + } stage('Archive artifact') { archiveArtifacts 'target/spring-petclinic-1.5.1.jar'