Skip to content

Commit

Permalink
kie-issues#599: set projectKey for sonarcloud (#3274)
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 f9149a5 commit 1807cd5
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 @@ -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 {
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 @@ -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)
Expand Down

0 comments on commit 1807cd5

Please sign in to comment.