mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
include sonarqube step
This commit is contained in:
parent
b83a0876b4
commit
4fc50c482f
1 changed files with 5 additions and 1 deletions
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue