From 8db384c44cdedefdbc228196ee06d808c1b2f848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20Zim=C3=A1nyi?= Date: Tue, 19 Dec 2023 15:30:24 +0100 Subject: [PATCH] [kie-issues#784] Remove unnecessary build environments and configuration. (#3055) Remove unnecessary build environments and configuration. --- .ci/jenkins/Jenkinsfile.deploy | 8 ----- .ci/jenkins/Jenkinsfile.setup-branch | 14 ++------ .ci/jenkins/config/branch.yaml | 15 ++------ .ci/jenkins/config/main.yaml | 3 -- .ci/jenkins/dsl/jobs.groovy | 36 +++++--------------- .ci/jenkins/project/Jenkinsfile.post-release | 10 +----- .ci/jenkins/project/Jenkinsfile.setup-branch | 10 +----- 7 files changed, 15 insertions(+), 81 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index 68836264ac..3dbcda10a7 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -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() } diff --git a/.ci/jenkins/Jenkinsfile.setup-branch b/.ci/jenkins/Jenkinsfile.setup-branch index bf22254755..1c0493b6d0 100644 --- a/.ci/jenkins/Jenkinsfile.setup-branch +++ b/.ci/jenkins/Jenkinsfile.setup-branch @@ -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 { @@ -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' -} - +} \ No newline at end of file diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index 145f634c96..7bc6888e81 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -1,3 +1,5 @@ +generation_config: + missing_environment: ignore environments: native: env_vars: @@ -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: @@ -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 diff --git a/.ci/jenkins/config/main.yaml b/.ci/jenkins/config/main.yaml index e1786b88f7..6180bd10cc 100644 --- a/.ci/jenkins/config/main.yaml +++ b/.ci/jenkins/config/main.yaml @@ -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: diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index d6e9285ee9..c4f1385a9f 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -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') } @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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) @@ -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 { @@ -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) { @@ -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 { @@ -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' -} diff --git a/.ci/jenkins/project/Jenkinsfile.post-release b/.ci/jenkins/project/Jenkinsfile.post-release index 01cb7e4caf..08b6eec9ce 100644 --- a/.ci/jenkins/project/Jenkinsfile.post-release +++ b/.ci/jenkins/project/Jenkinsfile.post-release @@ -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' -} +} \ No newline at end of file diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch b/.ci/jenkins/project/Jenkinsfile.setup-branch index 11d417b835..f54d7f3ba5 100644 --- a/.ci/jenkins/project/Jenkinsfile.setup-branch +++ b/.ci/jenkins/project/Jenkinsfile.setup-branch @@ -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' -} +} \ No newline at end of file