read from env, PR id

Signed-off-by: Michael Barz <mbarz@owncloud.com>
This commit is contained in:
Michael Barz committed 2020-07-10 16:51:04 +02:00
1 parent c9daeb52fa
commit 7a0f3846bb
2 files changed
+6 -7

No files matched your search

+1 -2
View File
@@ -134,11 +134,10 @@ 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,
'SONAR_PULL_REQUEST_KEY': ctx.build.ref.replace("refs/pull/", "").split("/")[0] if ctx.build.event == 'pull_request' else None,
},
},
],
+5 -5
View File
@@ -23,11 +23,11 @@ sonar.links.issue=https://github.com/owncloud/ocis-thumbnails/issues
sonar.sources=.
# Pull Requests
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}
sonar.pullrequest.provider=GitHub
sonar.pullrequest.github.repository=owncloud/ocis-thumbnails
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: