Merge pull request #663 from owncloud/enable-sonarcloud
Enable sonarcloud scanning and coverage
This commit is contained in:
+13
@@ -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',
|
'name': 'purge-cache',
|
||||||
'image': 'minio/mc',
|
'image': 'minio/mc',
|
||||||
|
|||||||
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
*/coverage.out
|
*/coverage.out
|
||||||
|
|
||||||
/**/config
|
ocis/config/identifier-registration.yaml
|
||||||
/**/bin
|
*/bin
|
||||||
/**/dist
|
*/dist
|
||||||
/hugo
|
/hugo
|
||||||
*.key
|
*.key
|
||||||
*crt
|
*crt
|
||||||
node_modules/
|
node_modules/
|
||||||
/*/assets
|
*/assets
|
||||||
|
|
||||||
.idea
|
.idea
|
||||||
|
|||||||
@@ -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