add sonar analyzer

Signed-off-by: David Christofas <dchristofas@owncloud.com>
This commit is contained in:
David Christofas
2020-07-10 13:59:41 +02:00
parent 56ed1cc8f7
commit c1dd1f78e5
2 changed files with 47 additions and 0 deletions

View File

@@ -138,6 +138,16 @@ def testing(ctx):
},
},
},
{
'name': 'sonarcloud',
'image': 'sonarsource/sonar-scanner-cli',
'pull': 'always',
'environment': {
'SONAR_TOKEN': {
'from_secret': 'sonar_token',
},
},
},
],
'volumes': [
{

37
sonar-project.properties Normal file
View File

@@ -0,0 +1,37 @@
sonar.projectKey=owncloud_ocis-accounts
sonar.organization=owncloud-1
sonar.projectName=ownCloud Infinite Scale: ACCOUNTS
sonar.projectVersion=1.0
sonar.host.url=https://sonarcloud.io
# =====================================================
# Meta-data for the project
# =====================================================
sonar.links.homepage=https://github.com/owncloud/ocis-accounts
sonar.links.ci=https://cloud.drone.io/owncloud/ocis-accounts/
sonar.links.scm=https://github.com/owncloud/ocis-accounts
sonar.links.issue=https://github.com/owncloud/ocis-accounts/issues
# =====================================================
# Properties that will be shared amongst all modules
# =====================================================
# SQ standard properties
sonar.sources=.
# Pull Requests
sonar.pullrequest.provider=GitHub
sonar.pullrequest.github.repository=owncloud/ocis-accounts
sonar.pullrequest.base=${env.DRONE_BRANCH}
sonar.pullrequest.branch=${env.DRONE_SOURCE_BRANCH}
sonar.pullrequest.key=${env.DRONE_PULL_REQUEST}
# Properties specific to language plugins:
sonar.go.coverage.reportPaths=coverage.out
# Exclude protobuf files
sonar.exclusions=pkg/proto/**, changelog/**, docs/**, package.json, rollup.config.js, changelog.md