mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-25 14:30:28 -05:00
tweak sonar config
only set pullrequest config if the build was triggered by a pull request Signed-off-by: David Christofas <dchristofas@owncloud.com>
This commit is contained in:
@@ -134,6 +134,11 @@ def testing(ctx):
|
||||
'SONAR_TOKEN': {
|
||||
'from_secret': 'sonar_token',
|
||||
},
|
||||
'SONAR_PULL_REQUEST_PROVIDER': 'GitHub' if ctx.build.event == 'pull_request' else None,
|
||||
'SONAR_PULL_REQUEST_REPO': 'owncloud/ocis-thumbnails' if ctx.build.event == 'pull_request' else None,
|
||||
'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 if ctx.build.event == 'pull_request' else None,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -23,11 +23,11 @@ sonar.links.issue=https://github.com/owncloud/ocis-thumbnails/issues
|
||||
sonar.sources=.
|
||||
|
||||
# Pull Requests
|
||||
sonar.pullrequest.provider=GitHub
|
||||
sonar.pullrequest.github.repository=owncloud/ocis-thumbnails
|
||||
sonar.pullrequest.base=${env.DRONE_BRANCH}
|
||||
sonar.pullrequest.branch=${env.DRONE_SOURCE_BRANCH}
|
||||
sonar.pullrequest.key=${env.DRONE_PULL_REQUEST}
|
||||
sonar.pullrequest.provider=${SONAR_PULL_REQUEST_PROVIDER}
|
||||
sonar.pullrequest.github.repository=${SONAR_PULL_REQUEST_REPO}
|
||||
sonar.pullrequest.base=${SONAR_PULL_REQUEST_BASE}
|
||||
sonar.pullrequest.branch=${SONAR_PULL_REQUEST_BRANCH}
|
||||
sonar.pullrequest.key=${SONAR_PULL_REQUEST_KEY}
|
||||
|
||||
|
||||
# Properties specific to language plugins:
|
||||
|
||||
Reference in New Issue
Block a user