Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
Add sonarqube to build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanwilder committed Apr 26, 2019
1 parent 1e2f787 commit a1d2c11
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pipeline {
}
}


stage('Test image') {
steps {
script {
Expand All @@ -36,6 +35,23 @@ pipeline {

}

stage('Sonarqube analysis') {
when{
branch "development"
}
steps {
node('linux') {
script{
withCredentials([string(credentialsId: 'sonar-login-key', variable: 'LOGIN')]) {
sh '''
/home/nviso/sonar-scanner-3.3.0.1492-linux/bin/sonar-scanner -Dsonar.login=$LOGIN
'''
}
}
}
}
}

stage('Push image') {
steps {
script {
Expand Down
4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# must be unique in a given SonarQube instance
sonar.projectKey=ee-outliers
sonar.sources=app/
sonar.host.url=http://localhost:9000

0 comments on commit a1d2c11

Please sign in to comment.