Unverified Commit 6fd474ce authored by sc979's avatar sc979 Committed by GitHub
Browse files

enh(chore): integrate sonarQube dev edition (#42)

parent cea09e72
......@@ -32,15 +32,27 @@ stage('Source') {
reportName: 'Centreon Clib Build Artifacts',
reportTitles: ''
])
if ((env.BUILD == 'RELEASE') || (env.BUILD == 'REFERENCE')) {
withSonarQubeEnv('SonarQube') {
sh "./centreon-build/jobs/clib/${serie}/mon-clib-analysis.sh"
}
withSonarQubeEnv('SonarQubeDev') {
sh "./centreon-build/jobs/clib/${serie}/mon-clib-analysis.sh"
}
}
}
try {
// sonarQube step to get qualityGate result
stage('Quality gate') {
timeout(time: 10, unit: 'MINUTES') {
def qualityGate = waitForQualityGate()
if (qualityGate.status != 'OK') {
currentBuild.result = 'FAIL'
}
}
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
error('Quality gate failure: ${qualityGate.status}.');
}
}
stage('Package') {
parallel 'centos7': {
node {
......
sonar.projectKey=centreon-clib-21.04
sonar.projectName=Centreon Clib 21.04
# project
sonar.projectKey={PROJECT_TITLE}
sonar.projectName={PROJECT_NAME}
sonar.projectVersion={PROJECT_VERSION}
sonar.sources=.
# mandatory to not fail the builds until build-wrapper is installed and sources are compiled
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment