From 52540946c7c7c39a70850ca9bde5dce3927e83f1 Mon Sep 17 00:00:00 2001 From: Matthieu Kermagoret Date: Mon, 10 Dec 2018 11:38:29 +0100 Subject: [PATCH] add SonarQube analysis to the Jenkinsfile (#1264) --- centreon-plugins/Jenkinsfile | 5 +++++ centreon-plugins/sonar-project.properties | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 centreon-plugins/sonar-project.properties diff --git a/centreon-plugins/Jenkinsfile b/centreon-plugins/Jenkinsfile index 0e5297c49..769994fd1 100644 --- a/centreon-plugins/Jenkinsfile +++ b/centreon-plugins/Jenkinsfile @@ -8,6 +8,11 @@ stage('Source') { source = readProperties file: 'source.properties' env.VERSION = "${source.VERSION}" env.RELEASE = "${source.RELEASE}" + if (env.BRANCH_NAME == 'master') { + withSonarQubeEnv('SonarQube') { + sh './centreon-build/jobs/plugins/plugins-analysis.sh' + } + } } } diff --git a/centreon-plugins/sonar-project.properties b/centreon-plugins/sonar-project.properties new file mode 100644 index 000000000..922afdb35 --- /dev/null +++ b/centreon-plugins/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.projectKey=centreon-plugins +sonar.projectName=Centreon Plugins +sonar.sources=.