mirror of
https://github.com/inspec/inspec
synced 2024-11-22 04:33:09 +00:00
Adds configuration required for sonarqube integration. (#6480)
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
parent
f54db5ccef
commit
f2016ac4d6
2 changed files with 12 additions and 5 deletions
|
@ -54,7 +54,7 @@ RAKE_EXIT=$?
|
|||
# If coverage is enabled, then we need to pick up the coverage/coverage.json file
|
||||
if [ -n "${CI_ENABLE_COVERAGE:-}" ]; then
|
||||
echo "--- installing sonarscanner"
|
||||
export SONAR_SCANNER_VERSION=4.6.2.2472
|
||||
export SONAR_SCANNER_VERSION=4.7.0.2747
|
||||
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
|
||||
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
|
||||
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
||||
|
@ -71,7 +71,7 @@ if [ -n "${CI_ENABLE_COVERAGE:-}" ]; then
|
|||
echo "--- running sonarscanner"
|
||||
sonar-scanner \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.host.url=https://sonarcloud.io
|
||||
-Dsonar.host.url=https://sonar.progress.com
|
||||
fi
|
||||
|
||||
exit $RAKE_EXIT
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
# must be unique in a given SonarQube instance
|
||||
sonar.projectKey=inspec_inspec_AYahEXtgJ4YHsO5MtHEr
|
||||
|
||||
# path to test coverage report generated by simplecov
|
||||
sonar.ruby.coverage.reportPaths=coverage/coverage.json
|
||||
sonar.projectKey=inspec_inspec
|
||||
sonar.organization=inspec
|
||||
|
||||
# exclude test directories from coverage
|
||||
sonar.coverage.exclusions=test/*,lib/plugins/*/test/*
|
||||
|
||||
sonar.exclusions=**/*.java,**/*.js,vendor/*
|
||||
|
||||
# skip C-language processor
|
||||
sonar.c.file.suffixes=-
|
||||
sonar.cpp.file.suffixes=-
|
||||
sonar.objc.file.suffixes=-
|
||||
sonar.objc.file.suffixes=-
|
Loading…
Reference in a new issue