mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-31 01:10:20 -06:00
Merge pull request #663 from owncloud/enable-sonarcloud
Enable sonarcloud scanning and coverage
This commit is contained in:
13
.drone.star
13
.drone.star
@@ -284,6 +284,19 @@ def uploadCoverage(ctx):
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'name': 'sonarcloud',
|
||||
'image': 'sonarsource/sonar-scanner-cli',
|
||||
'pull': 'always',
|
||||
'environment': {
|
||||
'SONAR_TOKEN': {
|
||||
'from_secret': 'sonar_token',
|
||||
},
|
||||
'SONAR_PULL_REQUEST_BASE': 'master' if ctx.build.event == 'pull_request' else None,
|
||||
'SONAR_PULL_REQUEST_BRANCH': ctx.build.source if ctx.build.event == 'pull_request' else None,
|
||||
'SONAR_PULL_REQUEST_KEY': ctx.build.ref.replace("refs/pull/", "").split("/")[0] if ctx.build.event == 'pull_request' else None,
|
||||
},
|
||||
},
|
||||
{
|
||||
'name': 'purge-cache',
|
||||
'image': 'minio/mc',
|
||||
|
||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,12 +1,12 @@
|
||||
*/coverage.out
|
||||
|
||||
/**/config
|
||||
/**/bin
|
||||
/**/dist
|
||||
ocis/config/identifier-registration.yaml
|
||||
*/bin
|
||||
*/dist
|
||||
/hugo
|
||||
*.key
|
||||
*crt
|
||||
node_modules/
|
||||
/*/assets
|
||||
*/assets
|
||||
|
||||
.idea
|
||||
|
||||
36
sonar-project.properties
Normal file
36
sonar-project.properties
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
sonar.projectKey=owncloud_ocis
|
||||
sonar.organization=owncloud-1
|
||||
sonar.projectName=ocis
|
||||
sonar.projectVersion=1.0
|
||||
sonar.host.url=https://sonarcloud.io
|
||||
|
||||
# =====================================================
|
||||
# Meta-data for the project
|
||||
# =====================================================
|
||||
|
||||
sonar.links.homepage=https://github.com/owncloud/ocis
|
||||
sonar.links.ci=https://drone.owncloud.com/owncloud/ocis/
|
||||
sonar.links.scm=https://github.com/owncloud/ocis
|
||||
sonar.links.issue=https://github.com/owncloud/ocis/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
|
||||
sonar.pullrequest.base=${env.SONAR_PULL_REQUEST_BASE}
|
||||
sonar.pullrequest.branch=${env.SONAR_PULL_REQUEST_BRANCH}
|
||||
sonar.pullrequest.key=${env.SONAR_PULL_REQUEST_KEY}
|
||||
|
||||
# Properties specific to language plugins:
|
||||
sonar.go.coverage.reportPaths=coverage/*_coverage.out
|
||||
|
||||
# Exclude files
|
||||
sonar.exclusions=changelog/**,*/pkg/assets/embed.go,konnectd/assets/identifier/**,**/package.json,**/rollup.config.js,CHANGELOG.md
|
||||
sonar.coverage.exclusions=docs/**,**/third_party,**/pkg/proto/**
|
||||
Reference in New Issue
Block a user