Skip to content

Commit

Permalink
[10.0.x] CI duplicate maven configuration entries (#6130)
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 Oct 18, 2024
1 parent 48e4410 commit 6155d6c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
14 changes: 11 additions & 3 deletions .ci/jenkins/config/branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ buildchain_config:
file_path: .ci/pull-request-config.yaml
token_credentials_id: kie-ci3-token
maven:
settings_file_id: kie-release-settings
settings:
nightly:
config_file_id: kie-nightly-settings
release:
config_file_id: kie-release-settings
nexus:
release_url: TO_DEFINE
release_repository: TO_DEFINE
Expand All @@ -59,8 +63,12 @@ maven:
build_promotion_profile_id: TO_DEFINE
artifacts_repository: ''
artifacts_upload_repository:
url: https://repository.apache.org/content/repositories/snapshots
creds_id: apache-nexus-kie-deploy-credentials
nightly:
url: https://repository.apache.org/content/repositories/snapshots
creds_id: apache-nexus-kie-deploy-credentials
release:
url: https://repository.apache.org/service/local/staging/deploy/maven2
creds_id: jenkins-deploy-to-nexus-staging
cloud:
image:
registry_user_credentials_id: DOCKERHUB_USER
Expand Down
28 changes: 14 additions & 14 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ setupSpecificBuildChainNightlyJob('sonarcloud', setupSonarProjectKeyEnv(nightlyJ
// Quarkus 3 nightly is exported to Kogito pipelines for easier integration

// Release jobs
setupDeployJob(JobType.RELEASE)
setupPromoteJob(JobType.RELEASE)
setupDeployJob()
setupPromoteJob()

// Weekly deploy job
setupWeeklyDeployJob()
Expand Down Expand Up @@ -284,7 +284,7 @@ void createSetupBranchJob() {
GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",

MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: Utils.getMavenSettingsConfigFileId(this, JobType.NIGHTLY.name),

IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
DROOLS_STREAM: Utils.getStream(this),
Expand All @@ -302,8 +302,8 @@ void createSetupBranchJob() {
}
}

void setupDeployJob(JobType jobType) {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-deploy', jobType, "${jenkins_path}/Jenkinsfile.deploy", 'Drools Deploy')
void setupDeployJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-deploy', JobType.RELEASE, "${jenkins_path}/Jenkinsfile.deploy", 'Drools Deploy')
JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
PROPERTIES_FILE_NAME: 'deployment.properties',
Expand All @@ -313,10 +313,10 @@ void setupDeployJob(JobType jobType) {
GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",

MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: Utils.getMavenSettingsConfigFileId(this, JobType.RELEASE.name),
MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_URL}",
MAVEN_REPO_CREDS_ID: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_CREDS_ID}",
MAVEN_DEPLOY_REPOSITORY: Utils.getMavenArtifactsUploadRepositoryUrl(this, JobType.RELEASE.name),
MAVEN_REPO_CREDS_ID: Utils.getMavenArtifactsUploadRepositoryCredentialsId(this, JobType.RELEASE.name),

DROOLS_STREAM: Utils.getStream(this),

Expand All @@ -342,8 +342,8 @@ void setupDeployJob(JobType jobType) {
}
}

void setupPromoteJob(JobType jobType) {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-promote', jobType, "${jenkins_path}/Jenkinsfile.promote", 'Drools Promote')
void setupPromoteJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-promote', JobType.RELEASE, "${jenkins_path}/Jenkinsfile.promote", 'Drools Promote')
JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
PROPERTIES_FILE_NAME: 'deployment.properties',
Expand All @@ -353,7 +353,7 @@ void setupPromoteJob(JobType jobType) {
GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",

MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: Utils.getMavenSettingsConfigFileId(this, JobType.RELEASE.name),
MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",

Expand Down Expand Up @@ -384,10 +384,10 @@ void setupWeeklyDeployJob() {
GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",

MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: Utils.getMavenSettingsConfigFileId(this, JobType.NIGHTLY.name),
MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_URL}",
MAVEN_REPO_CREDS_ID: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_CREDS_ID}",
MAVEN_DEPLOY_REPOSITORY: Utils.getMavenArtifactsUploadRepositoryUrl(this, JobType.NIGHTLY.name),
MAVEN_REPO_CREDS_ID: Utils.getMavenArtifactsUploadRepositoryCredentialsId(this, JobType.NIGHTLY.name),

DROOLS_STREAM: Utils.getStream(this),
])
Expand Down

0 comments on commit 6155d6c

Please sign in to comment.