You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by tz...@apache.org on 2023/11/03 15:08:06 UTC
(incubator-kie-kogito-apps) branch main updated: kie-issues_599: specify projectKey for sonar analysis (#1910)
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-apps.git
The following commit(s) were added to refs/heads/main by this push:
new fcb8acda3 kie-issues_599: specify projectKey for sonar analysis (#1910)
fcb8acda3 is described below
commit fcb8acda364ccb710ae4ebad4ebec873b5cce53d
Author: Jan Stastny <st...@gmail.com>
AuthorDate: Fri Nov 3 16:08:02 2023 +0100
kie-issues_599: specify projectKey for sonar analysis (#1910)
Co-authored-by: jstastny-cz <ja...@ibm.com>
---
.ci/jenkins/Jenkinsfile | 1 +
.ci/jenkins/dsl/jobs.groovy | 22 ++++++++++++++++------
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile
index 2defd4155..12df4ee15 100644
--- a/.ci/jenkins/Jenkinsfile
+++ b/.ci/jenkins/Jenkinsfile
@@ -16,6 +16,7 @@ pipeline {
BUILDCHAIN_PROJECT = 'apache/incubator-kie-kogito-apps'
ENABLE_SONARCLOUD = 'false'
+ SONAR_PROJECT_KEY = 'apache_incubator-kie-kogito-apps'
KOGITO_APPS_BUILD_MVN_OPTS = '-Dvalidate-formatting -Prun-code-coverage'
}
stages {
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
index 635d2f631..5e55efe50 100644
--- a/.ci/jenkins/dsl/jobs.groovy
+++ b/.ci/jenkins/dsl/jobs.groovy
@@ -118,15 +118,25 @@ Closure setup4AMCronTriggerJobParamsGetter = { script ->
return jobParams
}
-Closure setupAdditionalTimeoutForDefaultNightly = { script ->
- def jobParams = JobParamsUtils.DEFAULT_PARAMS_GETTER(script)
- jobParams.env.put('ADDITIONAL_TIMEOUT', '480')
- return jobParams
+Closure setupAdditionalTimeout = { Closure paramsGetter ->
+ return { script ->
+ def jobParams = paramsGetter(script)
+ jobParams.env.put('ADDITIONAL_TIMEOUT', '480')
+ return jobParams
+ }
+}
+
+Closure setupSonarProjectKeyEnv = { Closure paramsGetter ->
+ return { script ->
+ def jobParams = paramsGetter(script)
+ jobParams.env.put('SONAR_PROJECT_KEY', 'apache_incubator-kie-kogito-apps')
+ return jobParams
+ }
}
Closure nightlyJobParamsGetter = isMainStream() ? JobParamsUtils.DEFAULT_PARAMS_GETTER : setup4AMCronTriggerJobParamsGetter
-KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true, setupAdditionalTimeoutForDefaultNightly)
-setupSpecificBuildChainNightlyJob('sonarcloud', nightlyJobParamsGetter)
+KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true, setupAdditionalTimeout(JobParamsUtils.DEFAULT_PARAMS_GETTER))
+setupSpecificBuildChainNightlyJob('sonarcloud', setupAdditionalTimeout(setupSonarProjectKeyEnv(nightlyJobParamsGetter)))
setupSpecificBuildChainNightlyJob('native', nightlyJobParamsGetter)
setupNightlyQuarkusIntegrationJob('quarkus-main', nightlyJobParamsGetter)
setupNightlyQuarkusIntegrationJob('quarkus-branch', nightlyJobParamsGetter)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org