This is an automated email from the ASF dual-hosted git repository.

tzimanyi pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-runtimes.git


The following commit(s) were added to refs/heads/main by this push:
     new 1807cd5499 kie-issues#599: set projectKey for sonarcloud (#3274)
1807cd5499 is described below

commit 1807cd5499feeaf750aa4a4143052e27a5e9d639
Author: Jan Stastny <[email protected]>
AuthorDate: Fri Nov 3 16:08:38 2023 +0100

    kie-issues#599: set projectKey for sonarcloud (#3274)
    
    Co-authored-by: jstastny-cz <[email protected]>
---
 .ci/jenkins/Jenkinsfile     |  1 +
 .ci/jenkins/dsl/jobs.groovy | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile
index 232a27175e..06831ac5f5 100644
--- a/.ci/jenkins/Jenkinsfile
+++ b/.ci/jenkins/Jenkinsfile
@@ -15,6 +15,7 @@ pipeline {
         BUILDCHAIN_PROJECT = 'apache/incubator-kie-kogito-runtimes'
 
         ENABLE_SONARCLOUD = 'false'
+        SONAR_PROJECT_KEY = 'apache_incubator-kie-kogito-runtimes'
         KOGITO_RUNTIMES_BUILD_MVN_OPTS = '-Dvalidate-formatting 
-Prun-code-coverage'
     }
     stages {
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
index abeca6d80e..d8e97121b5 100644
--- a/.ci/jenkins/dsl/jobs.groovy
+++ b/.ci/jenkins/dsl/jobs.groovy
@@ -99,9 +99,17 @@ Utils.isMainBranch(this) && 
KogitoJobTemplate.createPullRequestMultibranchPipeli
 createSetupBranchJob()
 
 // Nightly jobs
+Closure setupSonarProjectKeyEnv = { Closure paramsGetter ->
+    return { script ->
+        def jobParams = paramsGetter(script)
+        jobParams.env.put('SONAR_PROJECT_KEY', 
'apache_incubator-kie-kogito-runtimes')
+        return jobParams
+    }
+}
+
 Closure nightlyJobParamsGetter = isMainStream() ? 
JobParamsUtils.DEFAULT_PARAMS_GETTER : setup4AMCronTriggerJobParamsGetter
 KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, 
'', true)
-setupSpecificBuildChainNightlyJob('sonarcloud', nightlyJobParamsGetter)
+setupSpecificBuildChainNightlyJob('sonarcloud', 
setupSonarProjectKeyEnv(nightlyJobParamsGetter))
 setupSpecificBuildChainNightlyJob('native', nightlyJobParamsGetter)
 setupNightlyQuarkusIntegrationJob('quarkus-main', nightlyJobParamsGetter)
 setupNightlyQuarkusIntegrationJob('quarkus-branch', nightlyJobParamsGetter)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to