add SonarQube analysis to the Jenkinsfile (#1264)

This commit is contained in:
Matthieu Kermagoret 2018-12-10 11:38:29 +01:00 committed by Colin Gagnaire
parent f7e10a3f44
commit 115887bd8d
2 changed files with 8 additions and 0 deletions

5
Jenkinsfile vendored
View File

@ -8,6 +8,11 @@ stage('Source') {
source = readProperties file: 'source.properties' source = readProperties file: 'source.properties'
env.VERSION = "${source.VERSION}" env.VERSION = "${source.VERSION}"
env.RELEASE = "${source.RELEASE}" env.RELEASE = "${source.RELEASE}"
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('SonarQube') {
sh './centreon-build/jobs/plugins/plugins-analysis.sh'
}
}
} }
} }

3
sonar-project.properties Normal file
View File

@ -0,0 +1,3 @@
sonar.projectKey=centreon-plugins
sonar.projectName=Centreon Plugins
sonar.sources=.