Skip to content

Commit

Permalink
change jenkins file
Browse files Browse the repository at this point in the history
  • Loading branch information
kimorkim committed Jul 18, 2018
1 parent a1e1c11 commit 7308128
Showing 1 changed file with 36 additions and 17 deletions.
53 changes: 36 additions & 17 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,43 @@ pipeline {
}
}
stages {
stage('SonarQube analysis') {
stage('SonarQube') {
when { changeRequest() }
steps {
script {
def scannerHome = tool "sonarqube-scanner";
withSonarQubeEnv("sonar") {
sh "${scannerHome}/bin/sonar-scanner " +
"-Dsonar.projectKey=entry.entryHW " +
"-Dsonar.projectName=EntryHW " +
"-Dsonar.sourceEncoding=UTF-8 " +
"-Dsonar.analysis.mode=preview " +
"-Dsonar.github.repository=entrylabs/entry-hw " +
"-Dsonar.github.endpoint=https://api.github.com " +
"-Dsonar.github.oauth=${GH_TOKEN} " +
"-Dsonar.issuesReport.console.enable=true " +
"-Dsonar.github.disableInlineComments=true " +
"-Dsonar.github.pullRequest=${env.CHANGE_ID} " +
"-Dsonar.sources=app "
failFast true
parallel {
stage('analysis') {
steps {
script {
def scannerHome = tool "sonarqube-scanner";
withSonarQubeEnv("sonar") {
sh "${scannerHome}/bin/sonar-scanner " +
"-Dsonar.projectKey=entry.entryHW " +
"-Dsonar.projectName=EntryHW " +
"-Dsonar.sourceEncoding=UTF-8 " +
"-Dsonar.analysis.mode=preview " +
"-Dsonar.github.repository=entrylabs/entry-hw " +
"-Dsonar.github.endpoint=https://api.github.com " +
"-Dsonar.github.oauth=${GH_TOKEN} " +
"-Dsonar.issuesReport.console.enable=true " +
"-Dsonar.github.disableInlineComments=true " +
"-Dsonar.github.pullRequest=${env.CHANGE_ID} " +
"-Dsonar.sources=app "
}
}
}
}
stage('scan') {
steps {
script {
def scannerHome = tool "sonarqube-scanner";
withSonarQubeEnv("sonar") {
sh "${scannerHome}/bin/sonar-scanner " +
"-Dsonar.projectKey=entry.entryHW " +
"-Dsonar.projectName=EntryHW " +
"-Dsonar.sourceEncoding=UTF-8 " +
"-Dsonar.sources=app "
}
}
}
}
}
Expand Down

0 comments on commit 7308128

Please sign in to comment.