Skip to content

Commit

Permalink
kie-issues_599: set projectKey for sonarcloud (#5573)
Browse files Browse the repository at this point in the history
Co-authored-by: jstastny-cz <[email protected]>
  • Loading branch information
jstastny-cz and jstastny-cz authored Nov 3, 2023
1 parent 093ebe3 commit 14286b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .ci/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pipeline {
BUILDCHAIN_CONFIG_FILE_PATH = '.ci/buildchain-config-pr-cdb.yaml'

ENABLE_SONARCLOUD = 'false'
SONAR_PROJECT_KEY = 'apache_incubator-kie-drools'
DROOLS_BUILD_MVN_OPTS = '-Prun-code-coverage'
}
stages {
Expand Down
10 changes: 9 additions & 1 deletion .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,18 @@ Closure setup3AMCronTriggerJobParamsGetter = { script ->
return jobParams
}

Closure setupSonarProjectKeyEnv = { Closure paramsGetter ->
return { script ->
def jobParams = paramsGetter(script)
jobParams.env.put('SONAR_PROJECT_KEY', 'apache_incubator-kie-drools')
return jobParams
}
}

Closure nightlyJobParamsGetter = isMainStream() ? JobParamsUtils.DEFAULT_PARAMS_GETTER : setup3AMCronTriggerJobParamsGetter
KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true)
setupSpecificBuildChainNightlyJob('native', nightlyJobParamsGetter)
setupSpecificBuildChainNightlyJob('sonarcloud', nightlyJobParamsGetter)
setupSpecificBuildChainNightlyJob('sonarcloud', setupSonarProjectKeyEnv(nightlyJobParamsGetter))
setupQuarkusIntegrationJob('quarkus-main', nightlyJobParamsGetter)
setupQuarkusIntegrationJob('quarkus-branch', nightlyJobParamsGetter)
setupQuarkusIntegrationJob('quarkus-lts', nightlyJobParamsGetter)
Expand Down

0 comments on commit 14286b0

Please sign in to comment.