Skip to content

Commit

Permalink
Remove unnecessary build environments and configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
baldimir committed Dec 19, 2023
1 parent c417c78 commit 610c23d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 81 deletions.
8 changes: 0 additions & 8 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -561,14 +561,6 @@ void pushOperatorTemporaryImage() {
imageUtils.pushImage(temporaryImageFullName)
}

boolean isStream8() {
return env.OPTAPLANNER_LATEST_STREAM == '8'
}

boolean isStream9() {
return env.OPTAPLANNER_LATEST_STREAM == '9'
}

boolean isDeployDisabled() {
return env.DISABLE_DEPLOY.toBoolean()
}
14 changes: 2 additions & 12 deletions .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ pipeline {

stage('Update Optaplanner version in kie-benchmarks') {
when {
// TODO to change once Optaplanner is totally migrated to Quarkus 3
expression { isStream8() && isMainBranch() }
expression { isMainBranch() }
}
steps {
script {
Expand Down Expand Up @@ -158,13 +157,4 @@ void mergeAndPush(String prLink, String targetBranch) {
githubscm.mergePR(prLink, getGitAuthorCredsId())
githubscm.pushObject('origin', targetBranch, getGitAuthorPushCredsId())
}
}

boolean isStream8() {
return env.OPTAPLANNER_LATEST_STREAM == '8'
}

boolean isStream9() {
return env.OPTAPLANNER_LATEST_STREAM == '9'
}

}
15 changes: 3 additions & 12 deletions .ci/jenkins/config/branch.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
generation_config:
missing_environment: ignore
environments:
native:
env_vars:
Expand All @@ -6,17 +8,6 @@ environments:
ADDITIONAL_TIMEOUT: 720
ids:
- native
quarkus-main:
enabled: false
env_vars:
QUARKUS_BRANCH: main
ids:
- quarkus
quarkus-branch:
env_vars:
QUARKUS_BRANCH: '2.16'
ids:
- quarkus
ecosystem:
auto_generation: false
ids:
Expand Down Expand Up @@ -85,5 +76,5 @@ jenkins:
args: --privileged --group-add docker
default_tools:
jdk: jdk_17_latest
maven: maven_3.8.6
maven: maven_3.9.3
sonar_jdk: jdk_17_latest
3 changes: 0 additions & 3 deletions .ci/jenkins/config/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ git:
branches:
- name: main
main_branch: true
- name: 8.45.x
seed:
branch: seed-optaplanner-8.45.x
seed:
config_file:
git:
Expand Down
36 changes: 8 additions & 28 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ setupProjectNightlyJob()
setupProjectReleaseJob()
setupProjectPostReleaseJob()

if (Utils.isMainBranch(this) && isStream8()) { // When there is Drools 9, we may enable the job for 9.x
if (Utils.isMainBranch(this)) {
setupProjectDroolsJob('main')
}

Expand Down Expand Up @@ -93,7 +93,7 @@ void createProjectSetupBranchJob() {
GIT_AUTHOR: "${GIT_AUTHOR_NAME}",

IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
OPTAPLANNER_LATEST_STREAM: getOptaPlannerLatestStream()
OPTAPLANNER_LATEST_STREAM: "${GIT_MAIN_BRANCH}"
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
Expand All @@ -115,7 +115,7 @@ void setupProjectNightlyJob() {

MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
ARTIFACTS_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
OPTAPLANNER_LATEST_STREAM: getOptaPlannerLatestStream()
OPTAPLANNER_LATEST_STREAM: "${GIT_MAIN_BRANCH}"
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
Expand All @@ -134,7 +134,7 @@ void setupProjectReleaseJob() {

DEFAULT_STAGING_REPOSITORY: "${MAVEN_NEXUS_STAGING_PROFILE_URL}",
ARTIFACTS_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
OPTAPLANNER_LATEST_STREAM: getOptaPlannerLatestStream()
OPTAPLANNER_LATEST_STREAM: "${GIT_MAIN_BRANCH}"
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
Expand Down Expand Up @@ -165,7 +165,7 @@ void setupProjectPostReleaseJob() {
MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",

GITHUB_CLI_VERSION: '0.11.1',
OPTAPLANNER_LATEST_STREAM: getOptaPlannerLatestStream()
OPTAPLANNER_LATEST_STREAM: "${GIT_MAIN_BRANCH}"
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
Expand Down Expand Up @@ -222,10 +222,6 @@ createSetupBranchJob()
// Nightly jobs
setupDeployJob(JobType.NIGHTLY)
setupSpecificBuildChainNightlyJob('native')
setupSpecificBuildChainNightlyJob('quarkus-main')
setupSpecificBuildChainNightlyJob('quarkus-branch')
setupSpecificBuildChainNightlyJob('quarkus-lts')
setupSpecificBuildChainNightlyJob('native-lts')

// Release jobs
setupDeployJob(JobType.RELEASE)
Expand Down Expand Up @@ -265,7 +261,7 @@ void createSetupBranchJob() {
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",

IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
OPTAPLANNER_LATEST_STREAM: getOptaPlannerLatestStream()
OPTAPLANNER_LATEST_STREAM: "${GIT_MAIN_BRANCH}"
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
Expand Down Expand Up @@ -293,7 +289,7 @@ void setupDeployJob(JobType jobType, String envName = '') {

JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
OPTAPLANNER_LATEST_STREAM: getOptaPlannerLatestStream(),
OPTAPLANNER_LATEST_STREAM: "${GIT_MAIN_BRANCH}",
DISABLE_DEPLOY: Utils.isDeployDisabled(this),
])
if (jobType == JobType.PULL_REQUEST) {
Expand Down Expand Up @@ -378,7 +374,7 @@ void setupPromoteJob(JobType jobType) {

PROPERTIES_FILE_NAME: 'deployment.properties',
GITHUB_CLI_VERSION: '0.11.1',
OPTAPLANNER_LATEST_STREAM: getOptaPlannerLatestStream()
OPTAPLANNER_LATEST_STREAM: "${GIT_MAIN_BRANCH}"
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
Expand Down Expand Up @@ -420,19 +416,3 @@ void setupOptaPlannerTurtleTestsJob(String constraintStreamImplType) {
}
}
}

String getOptaPlannerLatestStream() {
String gitMainBranch = "${GIT_MAIN_BRANCH}"

if (gitMainBranch == 'main') {
return '8'
} else if (gitMainBranch == '9.x') {
return '9'
} else {
return gitMainBranch
}
}

boolean isStream8() {
return getOptaPlannerLatestStream() == '8'
}
10 changes: 1 addition & 9 deletions .ci/jenkins/project/Jenkinsfile.post-release
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,4 @@ def forcePushBranch(String branch) {
git push origin ${branch} --force
"""
}
}

boolean isStream8() {
return env.OPTAPLANNER_LATEST_STREAM == '8'
}

boolean isStream9() {
return env.OPTAPLANNER_LATEST_STREAM == '9'
}
}
10 changes: 1 addition & 9 deletions .ci/jenkins/project/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,4 @@ String getVersionFromReleaseBranch(String releaseBranch, int microVersion = 0, S
} else {
error 'Cannot parse given branch as a release branch, aka [M].[m].x ...'
}
}

boolean isStream8() {
return env.OPTAPLANNER_LATEST_STREAM == '8'
}

boolean isStream9() {
return env.OPTAPLANNER_LATEST_STREAM == '9'
}
}

0 comments on commit 610c23d

Please sign in to comment.