include sonarqube step - FIX - JUNIT

This commit is contained in:
Alex Baptista 2017-12-01 19:53:32 -02:00
parent e477a3c299
commit 6caa8de16e

8
Jenkinsfile vendored
View file

@ -7,14 +7,14 @@ node('Slave_AWS'){
{ {
//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') stage('Sonarqube')
{ {
sh '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"' sh '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('Unit Test')
{
junit 'target/surefire-reports/*.xml'
}
stage('Archive artifact') stage('Archive artifact')
{ {
archiveArtifacts 'target/spring-petclinic-1.5.1.jar' archiveArtifacts 'target/spring-petclinic-1.5.1.jar'