Commit d27c18ec authored by Fernando Vazquez's avatar Fernando Vazquez

Added sonar package

parent 2293aa99
......@@ -23,11 +23,12 @@ pipeline {
stage('Build') {
steps {
echo "Building project..."
sh 'mvn -Dmaven.test.failure.ignore=false install'
sh 'mvn clean install'
}
}
stage('Test'){
steps{
echo "Running tests..."
sh 'mvn test'
}
post {
......@@ -39,7 +40,9 @@ pipeline {
stage('SonarQube Analysis') {
steps{
withSonarQubeEnv('Sonarqube') {
echo "Running SonarQube analysis...."
sh "mvn clean verify sonar:sonar -Dsonar.projectKey=hello-spring"
sh "mvn package sonar:sonar"
}
}
}
......@@ -50,7 +53,7 @@ pipeline {
}
}
}
stage("publish to nexus") {
stage("Publish to Nexus") {
steps {
script {
// Read POM xml file using 'readMavenPom' step , this step 'readMavenPom' is included in: https://plugins.jenkins.io/pipeline-utility-steps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment