Skip to content

Commit

Permalink
SonarQube Analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
javahometech authored Apr 16, 2018
1 parent c972a67 commit 321f498
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions sonarqube-analysis
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ node{
sh "${mvnHome}/bin/mvn package"
}

stage('SonarQube Analysis'){
def mvnHome = tool name: 'maven-3', type: 'maven'

withCredentials([string(credentialsId: 'sonarqube-token', variable: 'sonarToken')]) {
def sonarCMD = "sonar:sonar -Dsonar.host.url=http://35.154.40.90:9000 -Dsonar.login=${sonarToken}"
sh "${mvnHome}/bin/mvn ${sonarCMD}"
}
}
stage('SonarQube Analysis') {
def mvnHome = tool name: 'maven-3', type: 'maven'
sh "${mvnHome}/bin/mvn package"
withSonarQubeEnv('Sonar') {
sh "${mvnHome}/bin/mvn sonar:sonar"
}
}

stage('Email Notification'){
mail bcc: '', body: '''Hi Welcome to jenkins email alerts
Expand Down

0 comments on commit 321f498

Please sign in to comment.