diff --git a/Jenkinsfile b/Jenkinsfile index 9c434401b454eafd9197178865bbedec77dd4188..d6b2f81b50abe53f5d3297b9aa8864695657562c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,13 +9,30 @@ pipeline { tools { // Install the Maven version configured as "M3" and add it to the path. maven "/usr/share/maven" + jdk "java-11" } stages { stage('Compile') { steps { milestone 1 withSonarQubeEnv('SonarQube Production') { - sh "mvn -Dmaven.test.failure.ignore=true -Dsonar.projectName=GitSearch -Dsonar.projectKey=GITSEARCH clean test jacoco:report sonar:sonar" + sh "mvn " + } + } + } + stage('Test') { + steps { + milestone 1 + withSonarQubeEnv('SonarQube Production') { + sh "mvn -Dmaven.test.failure.ignore=true clean test" + } + } + } + stage('Evaluate') { + steps { + milestone 1 + withSonarQubeEnv('SonarQube Production') { + sh "mvn-Dsonar.projectName=GitSearch -Dsonar.projectKey=GITSEARCH jacoco:report sonar:sonar" } } }