From 94b3164bebc801ec2797550f3ffcbb5a5fa86aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Novotn=C3=BD?= Date: Wed, 13 Nov 2024 15:06:43 +0100 Subject: [PATCH 1/7] BXMSPROD-2211 removing prod kogito nightly https://issues.redhat.com/browse/BXMSPROD-2211 --- .../prod/prod_cron_meta_nightly_rhpam_pipeline.groovy | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/job-dsls/jobs/prod/prod_cron_meta_nightly_rhpam_pipeline.groovy b/job-dsls/jobs/prod/prod_cron_meta_nightly_rhpam_pipeline.groovy index fac4be6d..76ee9091 100644 --- a/job-dsls/jobs/prod/prod_cron_meta_nightly_rhpam_pipeline.groovy +++ b/job-dsls/jobs/prod/prod_cron_meta_nightly_rhpam_pipeline.groovy @@ -26,9 +26,9 @@ def NEXT_BLUE_PRODUCT_BRANCH='7.67.x-blue' def NEXT_BLUE_PRODUCT_CONFIG_BRANCH="bamoe/7.67.x-blue" def NEXT_BLUE_RHBA_VERSION_PREFIX='7.67.2.redhat-' -def KOGITO_BLUE_NEXT_PRODUCT_VERSION='1.13.2.blue' -def KOGITO_BLUE_NEXT_PRODUCT_BRANCH='1.13.x-blue' -def KOGITO_BLUE_NEXT_PRODUCT_CONFIG_BRANCH="kogito/1.13.x-blue" +//def KOGITO_BLUE_NEXT_PRODUCT_VERSION='1.13.2.blue' +//def KOGITO_BLUE_NEXT_PRODUCT_BRANCH='1.13.x-blue' +//def KOGITO_BLUE_NEXT_PRODUCT_CONFIG_BRANCH="kogito/1.13.x-blue" def RHBOP_CURRENT_PRODUCT_VERSION='8.38.0' def RHBOP_CURRENT_PRODUCT_BRANCH='8.38.x-prod' @@ -50,8 +50,7 @@ pipeline{ ${kogitoNightlyStage(KOGITO_NEXT_PRODUCT_VERSION, KOGITO_NEXT_PRODUCT_BRANCH, OPTAPLANNER_NEXT_PRODUCT_VERSION, NEXT_PRODUCT_VERSION, NEXT_RHBA_VERSION_PREFIX, KOGITO_NEXT_PRODUCT_CONFIG_BRANCH)} // blue - ${rhbaNightlyStage(NEXT_BLUE_PRODUCT_VERSION, NEXT_BLUE_PRODUCT_BRANCH, NEXT_BLUE_PRODUCT_CONFIG_BRANCH)} - ${kogitoNightlyStage(KOGITO_BLUE_NEXT_PRODUCT_VERSION, KOGITO_BLUE_NEXT_PRODUCT_BRANCH, null, NEXT_BLUE_PRODUCT_VERSION, NEXT_BLUE_RHBA_VERSION_PREFIX, KOGITO_BLUE_NEXT_PRODUCT_CONFIG_BRANCH)} + ${rhbaNightlyStage(NEXT_BLUE_PRODUCT_VERSION, NEXT_BLUE_PRODUCT_BRANCH, NEXT_BLUE_PRODUCT_CONFIG_BRANCH)} // RHBOP //{rhbopNightlyStage(RHBOP_NEXT_PRODUCT_BRANCH, RHBOP_NEXT_PRODUCT_CONFIG_BRANCH)} From ee003cb3b62b873961d320a77ce3f21450934ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Novotn=C3=BD?= Date: Wed, 13 Nov 2024 15:23:57 +0100 Subject: [PATCH 2/7] removed all kogito BAMOE pipelines/properties --- ..._bamoe_kogito_create_images_sources.groovy | 35 ----- ...d_bamoe_kogito_properties_generator.groovy | 74 ----------- ..._bamoe_kogito_stage_cpaas_artifacts.groovy | 32 ----- .../jobs/seed_jobs/kie_tools_seed_job.groovy | 68 ---------- .../org/kie/jenkins/jobdsl/Constants.groovy | 3 - ...e_images_templates_and_sources.jenkinsfile | 69 ---------- ...e_kogito_create_images_sources.jenkinsfile | 70 ---------- ...e_kogito_stage_cpaas_artifacts.jenkinsfile | 123 ------------------ 8 files changed, 474 deletions(-) delete mode 100644 job-dsls/jobs/prod/prod_bamoe_kogito_create_images_sources.groovy delete mode 100644 job-dsls/jobs/prod/prod_bamoe_kogito_properties_generator.groovy delete mode 100644 job-dsls/jobs/prod/prod_bamoe_kogito_stage_cpaas_artifacts.groovy delete mode 100644 job-dsls/jobs/seed_jobs/kie_tools_seed_job.groovy delete mode 100644 job-dsls/src/main/resources/job-scripts/prod_bamoe_create_images_templates_and_sources.jenkinsfile delete mode 100644 job-dsls/src/main/resources/job-scripts/prod_bamoe_kogito_create_images_sources.jenkinsfile delete mode 100644 job-dsls/src/main/resources/job-scripts/prod_bamoe_kogito_stage_cpaas_artifacts.jenkinsfile diff --git a/job-dsls/jobs/prod/prod_bamoe_kogito_create_images_sources.groovy b/job-dsls/jobs/prod/prod_bamoe_kogito_create_images_sources.groovy deleted file mode 100644 index e89e5e3c..00000000 --- a/job-dsls/jobs/prod/prod_bamoe_kogito_create_images_sources.groovy +++ /dev/null @@ -1,35 +0,0 @@ -/** -* Create the OpenShift images sources -*/ -def scriptTemplate = this.getClass().getResource("job-scripts/prod_bamoe_kogito_create_images_sources.jenkinsfile").text -def parsedScript = scriptTemplate.replaceAll(/<%=\s*(\w+)\s*%>/) { config[it[1]] ?: '' } - -def folderPath = "PROD" -folder(folderPath) - -pipelineJob("${folderPath}/bamoe-kogito-create-images-sources") { - description('This job creates the Openshift sources for BAMOE Kogito.') - - parameters { - stringParam('VERSION', '', 'The milestone version, i.e. 1.13.5') - stringParam("PRODUCT_MILESTONE", "CR1") - stringParam('BAMOE_VERSION', '', 'The BAMOE version related to the BAMOE Kogito release, i.e. 8.0.3') - stringParam('BRANCH', '1.13.x-blue', 'The OpenShift images branch used to build the images') - stringParam('BUILDS', '', 'List of Brew builds IDs separated by comma. Required images are: Kogito Runtime JVM, Kogito Runtime Native and Kogito Builder') - stringParam('OVERRIDING_FILES', 'bamoe-kogito-runtime-jvm-rhel8-overrides.yaml,bamoe-kogito-builder-rhel8-overrides.yaml', 'Comma separated list of the overriding files that will be fetched from the images repositories') - stringParam('GITHUB_REFERENCE', '', 'Override the GitHub reference for all cloned repositories') - booleanParam('UPLOAD_ARTIFACTS', true, 'If the generated artifacts should be uploaded to rcm-host') - } - - logRotator { - numToKeep(20) - } - - definition { - cps { - script(parsedScript) - sandbox() - } - } - -} \ No newline at end of file diff --git a/job-dsls/jobs/prod/prod_bamoe_kogito_properties_generator.groovy b/job-dsls/jobs/prod/prod_bamoe_kogito_properties_generator.groovy deleted file mode 100644 index e34ba35f..00000000 --- a/job-dsls/jobs/prod/prod_bamoe_kogito_properties_generator.groovy +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Generate properties files for productized builds. - * - * Generated files for productized builds: - * - kogito-deliverable-list-staging.properties - properties file pointing binaries in the staging area - * - kogito-deliverable-list.properties - properties file pointing binaries in the candidates area - */ -import org.kie.jenkins.jobdsl.Constants - -def kogitoProps =""" -import groovy.json.JsonOutput - -node('${Constants.LABEL_KIE_RHEL}') { - sh 'env\' - def binding = JsonOutput.toJson([ - "REPO_URL" : REPO_URL, - "DELIVERABLE_REPO_URL" : DELIVERABLE_REPO_URL, - "BAMOE_PRODUCT_VERSION" : BAMOE_PRODUCT_VERSION, - "PRODUCT_MILESTONE" : PRODUCT_MILESTONE, - "KOGITO_VERSION" : KOGITO_VERSION, - "QUARKUS_BOM_VERSION" : QUARKUS_BOM_VERSION, - "PLATFORM_QUARKUS_BOM_VERSION" : PLATFORM_QUARKUS_BOM_VERSION - ]) - - def folder = "bamoe/bamoe-\${BAMOE_PRODUCT_VERSION}.\${PRODUCT_MILESTONE}" - - build job: env.PROPERTIES_GENERATOR_PATH, parameters: [ - [\$class: 'StringParameterValue', name: 'FILE_ID', value: "\${RELEASE_STAGING_FILE_ID}"], - [\$class: 'StringParameterValue', name: 'FILE_NAME', value: 'kogito-deliverable-list-staging.properties'], - [\$class: 'StringParameterValue', name: 'FOLDER_PATH', value: folder], - [\$class: 'StringParameterValue', name: 'BINDING', value: binding] - ] - build job: env.PROPERTIES_GENERATOR_PATH, parameters: [ - [\$class: 'StringParameterValue', name: 'FILE_ID', value: "\${RELEASE_FILE_ID}"], - [\$class: 'StringParameterValue', name: 'FILE_NAME', value: 'kogito-deliverable-list.properties'], - [\$class: 'StringParameterValue', name: 'FOLDER_PATH', value: folder], - [\$class: 'StringParameterValue', name: 'BINDING', value: binding] - ] -} -""" - -// create needed folder(s) for where the jobs are created -def folderPath = "PROD" -folder(folderPath) - -pipelineJob("${folderPath}/bamoe-kogito-properties-generator") { - description("Generate properties files for BAMOE Kogito productized builds") - - parameters { - stringParam("REPO_URL", "\${STAGING_SERVER_URL}") - stringParam("DELIVERABLE_REPO_URL", "\${DOWNLOAD_CANDIDATES}/middleware") - stringParam("BAMOE_PRODUCT_VERSION", "8.0.0") - stringParam("PRODUCT_MILESTONE", "CR1") - stringParam("KOGITO_VERSION", "1.13.2.redhat-00001") - stringParam("QUARKUS_BOM_VERSION", "2.13.7.Final-redhat-00003") - stringParam("PLATFORM_QUARKUS_BOM_VERSION", "2.13.7.SP2-redhat-00002") - stringParam("RCM_GUEST_FOLDER", "\${RCM_GUEST_FOLDER}") - stringParam("RCM_HOST", "\${RCM_HOST}") - stringParam("RELEASE_STAGING_FILE_ID", "kogito-blue-prod-properties-template") - stringParam("RELEASE_FILE_ID", "kogito-blue-prod-deliverable-properties-template") - } - - logRotator { - numToKeep(10) - } - - definition { - cps { - script(kogitoProps) - sandbox() - } - } - -} diff --git a/job-dsls/jobs/prod/prod_bamoe_kogito_stage_cpaas_artifacts.groovy b/job-dsls/jobs/prod/prod_bamoe_kogito_stage_cpaas_artifacts.groovy deleted file mode 100644 index 8bbd720f..00000000 --- a/job-dsls/jobs/prod/prod_bamoe_kogito_stage_cpaas_artifacts.groovy +++ /dev/null @@ -1,32 +0,0 @@ -/** -* Stage BAMOE Kogito artifacts produced by CPaaS into host rcm-host. -*/ -def scriptTemplate = this.getClass().getResource("job-scripts/prod_bamoe_kogito_stage_cpaas_artifacts.jenkinsfile").text -def parsedScript = scriptTemplate.replaceAll(/<%=\s*(\w+)\s*%>/) { config[it[1]] ?: '' } - -def folderPath = "PROD" -folder(folderPath) - -pipelineJob("${folderPath}/bamoe-kogito-stage-cpaas-artifacts") { - description("This job stages BAMOE Kogito artifacts produced by CPaaS into host rcm-host. \n" + - "The staging is performed directly into the host through SSH and it adjust artifacts for the given BAMOE Kogito milestone release.") - - parameters { - stringParam('PRODUCT_NAME', 'bamoe-kogito', 'Product name') - stringParam('VERSION', '', ' The release candidate version, i.e. 1.13.2.CR1') - stringParam('BAMOE_VERSION', '', ' The BAMOE release candidate version related to the BAMOE Kogito release, i.e. 8.0.0.CR1') - stringParam('RCM_HOST', "\${RCM_HOST}", 'rcm host') - } - - logRotator { - numToKeep(20) - } - - definition { - cps { - script(parsedScript) - sandbox() - } - } - -} \ No newline at end of file diff --git a/job-dsls/jobs/seed_jobs/kie_tools_seed_job.groovy b/job-dsls/jobs/seed_jobs/kie_tools_seed_job.groovy deleted file mode 100644 index a6028581..00000000 --- a/job-dsls/jobs/seed_jobs/kie_tools_seed_job.groovy +++ /dev/null @@ -1,68 +0,0 @@ -import org.kie.jenkins.jobdsl.Constants - -// definition of parameters - -def javaToolEnv="KIE_JDK1_8" -def baseBranch=Constants.BRANCH -def organization=Constants.GITHUB_ORG_UNIT -def javadk=Constants.JDK_TOOL - -// +++++++++++++++++++++++++++++++++++++++++++ create a seed job ++++++++++++++++++++++++++++++++++++++++++++++++++++ - -// creation of folder where this seed job should run -folder("KIE") -folder("KIE/kie-tools") -def folderPath="KIE/kie-tools" - -job("${folderPath}/a-seed-job-kie-tools") { - - description("this job creates all needed Jenkins jobs in kie-tools folder ") - - label("kie-rhel8 && kie-mem8g && !built-in") - - logRotator { - numToKeep(10) - } - - jdk("${javadk}") - - scm { - git { - remote { - github("${organization}/kie-ci") - } - branch ("${baseBranch}") - } - } - - wrappers { - timestamps() - colorizeOutput() - toolenv("${javaToolEnv}") - preBuildCleanup() - } - - triggers { - gitHubPushTrigger() - } - - steps { - jobDsl { - targets("job-dsls/jobs/kie/kie-tools/*.groovy\n" + - "job-dsls/jobs/kie/kie-tools/upgradeVersions/*.groovy\n" + - "job-dsls/jobs/seed_jobs/kie_tools_seed_job.groovy") - useScriptText(false) - sandbox(false) - ignoreExisting(false) - ignoreMissingFiles(false) - failOnMissingPlugin(true) - unstableOnDeprecation(true) - removedJobAction('DELETE') - removedViewAction('IGNORE') - removedConfigFilesAction('IGNORE') - lookupStrategy('JENKINS_ROOT') - additionalClasspath("job-dsls/src/main/groovy\n" + - "job-dsls/src/main/resources") - } - } -} \ No newline at end of file diff --git a/job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy b/job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy index 3f32c4c2..31dd42a4 100644 --- a/job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy +++ b/job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy @@ -70,9 +70,6 @@ class Constants { static final String CREDENTIALS_ID_TOKEN = 'kie-ci' static final String RHPAM_KOGITO_OPERTOR_BRANCH = '1.13.x-next' static final String RHPAM_KOGITO_IMAGE_BRANCH = '1.13.x-next' - static final String BAMOE_BA_OPERTOR_BRANCH = 'release-v7.13.x-blue-next' - static final String BAMOE_KOGITO_OPERTOR_BRANCH = '1.13.x-blue-next' - static final String BAMOE_KOGITO_IMAGE_BRANCH = '1.13.x-blue-next' static final String RHPAM_BA_OPERTOR_CEKIT_OSBS_SUBDIR = '/home/jenkins/.cekit/osbs/containers/rhpam-7-operator' static final String BAMOE_BA_OPERTOR_CEKIT_OSBS_SUBDIR = '/home/jenkins/.cekit/osbs/containers/ibm-bamoe-operator' diff --git a/job-dsls/src/main/resources/job-scripts/prod_bamoe_create_images_templates_and_sources.jenkinsfile b/job-dsls/src/main/resources/job-scripts/prod_bamoe_create_images_templates_and_sources.jenkinsfile deleted file mode 100644 index 50bc5604..00000000 --- a/job-dsls/src/main/resources/job-scripts/prod_bamoe_create_images_templates_and_sources.jenkinsfile +++ /dev/null @@ -1,69 +0,0 @@ -@Library('jenkins-pipeline-shared-libraries')_ - -pipeline { - agent { - label 'kie-rhel8 && !built-in' - } - - stages { - stage('Clean workspace') { - steps { - cleanWs() - } - } - - stage('Print variables') { - steps { - println "[INFO] VERSION: ${VERSION}" - println "[INFO] PRODUCT_MILESTONE: ${PRODUCT_MILESTONE}" - println "[INFO] BRANCH: ${BRANCH}" - println "[INFO] BUILDS: ${BUILDS}" - println "[INFO] OVERRIDING_FILES: ${OVERRIDING_FILES}" - println "[INFO] GITHUB_REFERENCE: ${GITHUB_REFERENCE}" - println "[INFO] UPLOAD_ARTIFACTS: ${UPLOAD_ARTIFACTS}" - } - } - - stage('Clone the repository') { - steps { - sh "git clone --branch bamoe-src ${BXMS_TOOLING_REPOSITORY} bxms-tooling" - } - } - - stage('Create images templates and sources') { - steps { - script { - dir('bxms-tooling/release_scripts') { - def OPTIONAL_PARAMS = GITHUB_REFERENCE != "" ? "--cref ${GITHUB_REFERENCE}" : '' - util.runWithPythonVirtualEnv("python3 GenerateOpenshiftSrc.py --product rhpam --builds ${BUILDS} --version ${VERSION} --branch ${BRANCH} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') - } - } - } - } - - stage('Upload artifacts') { - when { - expression { return params.UPLOAD_ARTIFACTS } - } - steps { - script { - uploadArtifacts() - } - } - } - } - - post { - always { - archiveArtifacts artifacts: 'bxms-tooling/release_scripts/*.zip', fingerprint: true - cleanWs() - } - } -} - -def uploadArtifacts() { - println 'Uploading artifacts' - util.withKerberos('rhba-prod-keytab') { - sh "rsync -rlp --info=progress2 bxms-tooling/release_scripts/*.zip rhba-prod@${RCM_HOST}:staging/bamoe/bamoe-${VERSION}.${PRODUCT_MILESTONE}" - } -} diff --git a/job-dsls/src/main/resources/job-scripts/prod_bamoe_kogito_create_images_sources.jenkinsfile b/job-dsls/src/main/resources/job-scripts/prod_bamoe_kogito_create_images_sources.jenkinsfile deleted file mode 100644 index df04ec16..00000000 --- a/job-dsls/src/main/resources/job-scripts/prod_bamoe_kogito_create_images_sources.jenkinsfile +++ /dev/null @@ -1,70 +0,0 @@ -@Library('jenkins-pipeline-shared-libraries')_ - -pipeline { - agent { - label 'kie-rhel8 && !built-in' - } - - stages { - stage('Clean workspace') { - steps { - cleanWs() - } - } - - stage('Print variables') { - steps { - println "[INFO] VERSION: ${VERSION}" - println "[INFO] PRODUCT_MILESTONE: ${PRODUCT_MILESTONE}" - println "[INFO] BAMOE_VERSION: ${BAMOE_VERSION}" - println "[INFO] BRANCH: ${BRANCH}" - println "[INFO] BUILDS: ${BUILDS}" - println "[INFO] OVERRIDING_FILES: ${OVERRIDING_FILES}" - println "[INFO] GITHUB_REFERENCE: ${GITHUB_REFERENCE}" - println "[INFO] UPLOAD_ARTIFACTS: ${UPLOAD_ARTIFACTS}" - } - } - - stage('Clone the repository') { - steps { - sh "git clone --branch kogito-bamoe-src ${BXMS_TOOLING_REPOSITORY} bxms-tooling" - } - } - - stage('Create images sources') { - steps { - script { - dir('bxms-tooling/release_scripts') { - def OPTIONAL_PARAMS = GITHUB_REFERENCE != "" ? "--cref ${GITHUB_REFERENCE}" : '' - util.runWithPythonVirtualEnv("python3 GenerateOpenshiftSrc.py --product kogito --builds ${BUILDS} --version ${VERSION} --branch ${BRANCH} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') - } - } - } - } - - stage('Upload artifacts') { - when { - expression { return params.UPLOAD_ARTIFACTS } - } - steps { - script { - uploadArtifacts() - } - } - } - } - - post { - always { - archiveArtifacts artifacts: 'bxms-tooling/release_scripts/*.zip', fingerprint: true - cleanWs() - } - } -} - -def uploadArtifacts() { - println 'Uploading artifacts' - util.withKerberos('rhba-prod-keytab') { - sh "rsync -rlp --info=progress2 bxms-tooling/release_scripts/*.zip rhba-prod@${RCM_HOST}:staging/bamoe/bamoe-${BAMOE_VERSION}.${PRODUCT_MILESTONE}" - } -} diff --git a/job-dsls/src/main/resources/job-scripts/prod_bamoe_kogito_stage_cpaas_artifacts.jenkinsfile b/job-dsls/src/main/resources/job-scripts/prod_bamoe_kogito_stage_cpaas_artifacts.jenkinsfile deleted file mode 100644 index 84de6c51..00000000 --- a/job-dsls/src/main/resources/job-scripts/prod_bamoe_kogito_stage_cpaas_artifacts.jenkinsfile +++ /dev/null @@ -1,123 +0,0 @@ -@Library('jenkins-pipeline-shared-libraries')_ - -def artifacts = [ - [originClassifier: 'kogito-quickstarts.zip', finalClassifier: 'kogito-quickstarts.zip', info: 'Moving quickstarts zip'], - [originClassifier: 'maven-repository.zip', finalClassifier: 'kogito-maven-repository.zip', info: 'Moving maven repository zip'], - [originClassifier: 'license.zip', finalClassifier: 'kogito-licenses.zip', info: 'Moving licenses zip'], - [originClassifier: 'src.zip', finalClassifier: 'kogito-sources.zip', info: 'Moving sources zip'], - [originClassifier: 'offliner.zip', finalClassifier: 'kogito-offliner.zip', stageCommand: 'mv', info: 'Moving offliner zip'] -] - -pipeline { - agent { - label 'kie-rhel8 && !built-in' - } - - environment { - PRODUCT_NAME = PRODUCT_NAME.trim() - VERSION = VERSION.trim() - BAMOE_VERSION = BAMOE_VERSION.trim() - RCM_HOST = RCM_HOST.trim() - STAGING_BASE_PATH = "${RCM_GUEST_FOLDER}" - BAMOE_KOGITO_FOLDER_PATH = "${STAGING_BASE_PATH}/bamoe/${PRODUCT_NAME}-${VERSION}" - BAMOE_KOGITO_FOLDER_PATH_RELATIVE = "staging/bamoe/${PRODUCT_NAME}-${VERSION}" - BAMOE_FOLDER_PATH = "${STAGING_BASE_PATH}/bamoe/bamoe-${BAMOE_VERSION}" - BAMOE_FOLDER_PATH_RELATIVE = "staging/bamoe/bamoe-${BAMOE_VERSION}" - } - - stages { - stage('Clean workspace') { - steps { - cleanWs() - } - } - - stage('Print variables') { - steps { - println "[INFO] PRODUCT_NAME: ${PRODUCT_NAME}" - println "[INFO] VERSION: ${VERSION}" - println "[INFO] BAMOE_VERSION: ${BAMOE_VERSION}" - println "[INFO] RCM_HOST: ${RCM_HOST}" - println "[INFO] STAGING_BASE_PATH: ${STAGING_BASE_PATH}" - } - } - - stage('Clone integration-platform-tooling repository') { - steps { - sh "git clone ${INTEGRATION_PLATFORM_TOOLING_REPOSITORY} integration-platform-tooling" - } - } - - stage('Create offliner zip') { - steps { - script { - createOfflinerZip() - } - } - } - - stage('Stage artifacts produced by CPaaS') { - steps { - script { - for (artifact in artifacts) { - stageArtifact(artifact) - } - } - } - } - - stage('Generate maven repository text') { - steps { - script { - generateMavenRepositoryText() - } - } - } - } - - post { - always { - cleanWs() - } - } -} - -def createOfflinerZip() { - println 'Creating offliner zip' - def offlinerFolderName = "${PRODUCT_NAME}-${getMilestoneVersion(BAMOE_VERSION)}-offliner" - def offlinerFolderPath = "${BAMOE_KOGITO_FOLDER_PATH}/${offlinerFolderName}" - def offlinerFile = "${BAMOE_KOGITO_FOLDER_PATH}/offliner.txt" - - remoteExec("mkdir -p ${offlinerFolderPath}") - remoteExec("cp ${offlinerFile} ${offlinerFolderPath}") - util.withKerberos('rhba-prod-keytab') { - def relativeOfflinerFolderPath = "${BAMOE_KOGITO_FOLDER_PATH_RELATIVE}/${offlinerFolderName}" - sh "rsync -rlp --info=progress2 integration-platform-tooling/scripts/rhba/build-offline-repo.sh rhba-prod@${RCM_HOST}:${relativeOfflinerFolderPath}/offline-repo-builder.sh" - } - remoteExec("zip -C ${BAMOE_KOGITO_FOLDER_PATH_RELATIVE} -r ${PRODUCT_NAME}-${VERSION}-offliner.zip ${offlinerFolderName}") - remoteExec("rm -rf ${offlinerFolderPath} ${offlinerFile}") -} - -def stageArtifact(artifact) { - def artifactPath = "${BAMOE_KOGITO_FOLDER_PATH}/${PRODUCT_NAME}-${VERSION}-${artifact.originClassifier}" - def targetArtifactPath = "${BAMOE_FOLDER_PATH}/bamoe-${getMilestoneVersion(BAMOE_VERSION)}-${artifact.finalClassifier}" - println "${artifact.info} from ${artifactPath} to ${targetArtifactPath}" - remoteExec("mv ${artifactPath} ${targetArtifactPath}") -} - -def generateMavenRepositoryText() { - println 'Generating maven repository text file' - def mavenRepoFileName = "bamoe-${getMilestoneVersion(BAMOE_VERSION)}-kogito-maven-repository" - - remoteExec("zip -C ${BAMOE_FOLDER_PATH_RELATIVE} -t ${mavenRepoFileName}.text ${mavenRepoFileName}.zip") -} - -def getMilestoneVersion(version) { - return version.substring(0, version.lastIndexOf('.')) -} - -def remoteExec(command) { - util.withKerberos('rhba-prod-keytab') { - return sh(script: "ssh rhba-prod@${RCM_HOST} '${command}'", returnStdout: true) - } -} From 868d1c066bdb7b89fab0b26404fc19ad801bb5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Novotn=C3=BD?= Date: Wed, 13 Nov 2024 15:26:16 +0100 Subject: [PATCH 3/7] re-added a property mistakenly removed --- job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy b/job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy index 31dd42a4..524d1119 100644 --- a/job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy +++ b/job-dsls/src/main/groovy/org/kie/jenkins/jobdsl/Constants.groovy @@ -70,6 +70,7 @@ class Constants { static final String CREDENTIALS_ID_TOKEN = 'kie-ci' static final String RHPAM_KOGITO_OPERTOR_BRANCH = '1.13.x-next' static final String RHPAM_KOGITO_IMAGE_BRANCH = '1.13.x-next' + static final String BAMOE_BA_OPERTOR_BRANCH = 'release-v7.13.x-blue-next' static final String RHPAM_BA_OPERTOR_CEKIT_OSBS_SUBDIR = '/home/jenkins/.cekit/osbs/containers/rhpam-7-operator' static final String BAMOE_BA_OPERTOR_CEKIT_OSBS_SUBDIR = '/home/jenkins/.cekit/osbs/containers/ibm-bamoe-operator' From 4c922bcf20159a8d4578e648113ffa6547924f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Novotn=C3=BD?= Date: Wed, 13 Nov 2024 15:26:16 +0100 Subject: [PATCH 4/7] re-added a property mistakenly removed --- ..._kogito_images_osbs_seed_cloud_jobs.groovy | 221 ------------------ ...amoe_operators_osbs_seed_cloud_jobs.groovy | 12 +- ...create_images_templates_and_sources.groovy | 34 --- 3 files changed, 3 insertions(+), 264 deletions(-) delete mode 100644 job-dsls/jobs/osbs/bamoe_kogito_images_osbs_seed_cloud_jobs.groovy delete mode 100644 job-dsls/jobs/prod/prod_bamoe_create_images_templates_and_sources.groovy diff --git a/job-dsls/jobs/osbs/bamoe_kogito_images_osbs_seed_cloud_jobs.groovy b/job-dsls/jobs/osbs/bamoe_kogito_images_osbs_seed_cloud_jobs.groovy deleted file mode 100644 index 49725a28..00000000 --- a/job-dsls/jobs/osbs/bamoe_kogito_images_osbs_seed_cloud_jobs.groovy +++ /dev/null @@ -1,221 +0,0 @@ -package osbs - -import org.kie.jenkins.jobdsl.Constants - -def folderPath = 'OSBS/bamoe-kogito-images' -folder('OSBS') -folder('OSBS/bamoe-kogito-images') -// Job Description -String jobDescription = 'Job responsible for seed jobs to building bamoe kogito images' - -//Define Variables -def prodComponent = [ - 'bamoe-kogito-builder-rhel8', 'bamoe-kogito-runtime-jvm-rhel8', 'bamoe-kogito-runtime-native-rhel8'] - -def buildDate = Constants.BUILD_DATE -def prodVersion = Constants.BAMOE_NEXT_PROD_VERSION -def osbsBuildTarget = Constants.OSBS_BUILD_TARGET -def cekitBuildOptions = Constants.CEKIT_BUILD_OPTIONS -def osbsBuildUser = Constants.OSBS_BUILD_USER -def kerberosPrincipal = Constants.KERBEROS_PRINCIPAL -def kerberosKeytab = Constants.KERBEROS_KEYTAB -def kerberosCred = Constants.KERBEROS_CRED -def imageRepo = Constants.IMAGE_REPO -def imageBranch = Constants.IMAGE_BRANCH -def imageSubdir = Constants.IMAGE_SUBDIR -def gitUser = Constants.GIT_USER -def gitEmail = Constants.GIT_EMAIL -def cekitCacheLocal = Constants.CEKIT_CACHE_LOCAL -def verbose = Constants.VERBOSE -def githubOrgUnit = Constants.GITHUB_ORG_UNIT -def bamoeKogitoImageBranch = Constants.BAMOE_KOGITO_IMAGE_BRANCH -def bamoeKogitoImageCekitOSBSSubdir = Constants.BAMOE_BA_OPERTOR_CEKIT_OSBS_SUBDIR - -prodComponent.each { Component -> - - pipelineJob("${folderPath}/${Component}") { - parameters { - stringParam('BUILD_DATE', "${buildDate}") - stringParam('PROD_VERSION', "${prodVersion}") - stringParam('PROD_COMPONENT', "${Component}") - stringParam('OSBS_BUILD_TARGET', "${osbsBuildTarget}") - stringParam('CEKIT_BUILD_OPTIONS', "${cekitBuildOptions}") - stringParam('KERBEROS_PRINCIPAL', "${kerberosPrincipal}") - stringParam('OSBS_BUILD_USER', "${osbsBuildUser}") - stringParam('KERBEROS_KEYTAB', "${kerberosKeytab}") - stringParam('KERBEROS_CRED', "${kerberosCred}") - stringParam('IMAGE_REPO', "${imageRepo}") - stringParam('IMAGE_BRANCH', "${imageBranch}") - stringParam('IMAGE_SUBDIR', "${imageSubdir}") - stringParam('GIT_USER', "${gitUser}") - stringParam('GIT_EMAIL', "${gitEmail}") - stringParam('CEKIT_CACHE_LOCAL', "${cekitCacheLocal}") - stringParam('VERBOSE', "${verbose}") - stringParam('GITHUB_ORG_UNIT', "${githubOrgUnit}") - stringParam('BAMOE_KOGITO_IMAGE_BRANCH', "${bamoeKogitoImageBranch}") - stringParam('CEKIT_OSBS_SUBDIR', "/home/jenkins/.cekit/osbs/containers/${Component}") - } - - definition { - cps { - script(''' - - library 'jenkins-pipeline-shared-libraries' - - TIMEOUT = 2 - - pipeline { - options { - timeout(time: TIMEOUT, unit: 'HOURS') - } - - agent { - label 'osbs-builder && podman && rhel8' - } - - environment { - PRODUCT_NAME = PROD_COMPONENT.trim() - VERSION = PROD_VERSION.trim() - } - - stages { - stage('Clean workspace') { - steps { - cleanWs() - } - } - - stage('Building image') { - steps { - // Add the working directory to the current path so any scripts dropped there are on the path - withEnv(['PATH+W=$WORKSPACE']) { - sh "rm -rf ${WORKSPACE}/{*,.*} || true" - script { - if (env.KERBEROS_CRED) { - withCredentials([usernamePassword(credentialsId: env.KERBEROS_CRED, usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { - mainProcess(USERNAME, PASSWORD, '') - } - } else if (env.KERBEROS_KEYTAB) { - withCredentials([file(credentialsId: env.KERBEROS_KEYTAB, variable: 'FILE')]) { - if (!env.KERBEROS_PRINCIPAL) { - echo 'Reading the Kerberos Principal from provided Keytab...' - def get_principal_from_file = sh(returnStdout: true, script: \'\'\' - #!/bin/bash - klist -kt $FILE |grep REDHAT.COM | awk -F" " \'NR==1{print $4}\' - \'\'\') - env.KERBEROS_PRINCIPAL = get_principal_from_file.trim() - } - mainProcess(env.KERBEROS_PRINCIPAL, '', FILE) - } - } else { - error 'Either KERBEROS_PRINCIPAL and KERBEROS_KEYTAB must be specified, or user/password with KERBEROS_CRED' - } - } - } - } - } - - stage('persist image name into a txt file') { - steps { - echo "Persisting the ${env.BUILT_IMAGE} to a file..." - writeFile file: "${PROD_COMPONENT}-image-location.txt", text: "${env.BUILT_IMAGE}" - } - } - } - - post { - always { - archiveArtifacts artifacts: "${PROD_COMPONENT}-image-location.txt", onlyIfSuccessful: true - } - cleanup { - cleanWs() - } - } - } - - - // Auxiliary Functions - private void validateParameters(required, optionals){ - // Check if all required params are supplied - for ( param in required ) { - def arg = param.value[0] - def flag = param.value[1] - if(!param.value[0]){ - error "${param.key} parameter is required but was not specified." - } - } - } - - private void mainProcess(user, password, keytab){ - // Parameters available for the build. - def REQUIRED_BUILD_PARAMETERS = [ - 'PROD_VERSION': [PROD_VERSION, '-v'], - 'PROD_COMPONENT': [PROD_COMPONENT, '-c'], - 'OSBS_BUILD_TARGET': [OSBS_BUILD_TARGET, '-t'], - 'CEKIT_OSBS_SUBDIR': [CEKIT_OSBS_SUBDIR, '-d'], - ] - def OPTIONAL_BUILD_PARAMETERS = [ - 'KERBEROS_PASSWORD': [password, '-s'], - 'KERBEROS_PRINCIPAL': [user, '-p'], - 'KERBEROS_KEYTAB': [keytab, '-k'], - 'OSBS_BUILD_USER': [OSBS_BUILD_USER, '-i'], - 'BUILD_DATE': [BUILD_DATE, '-b'], - 'GIT_USER': [GIT_USER, '-u'], - 'GIT_EMAIL': [GIT_EMAIL, '-e'], - 'CEKIT_BUILD_OPTIONS': [CEKIT_BUILD_OPTIONS, '-o'], - 'CEKIT_CACHE_LOCAL': [CEKIT_CACHE_LOCAL, '-l'], - ] - def OPTIONAL_BUILD_SWITCHES = [ - 'VERBOSE': [VERBOSE, '-g'], - ] - - // The build script is in the image, but build.sh and build-overrides.sh which it calls will be downloaded - def build_command = 'build-osbs.sh' - - // Create the build command - validateParameters(REQUIRED_BUILD_PARAMETERS, OPTIONAL_BUILD_PARAMETERS) - - for(param in REQUIRED_BUILD_PARAMETERS){ - build_command += " ${param.value[1]} ${param.value[0]}" - } - - for(param in OPTIONAL_BUILD_PARAMETERS){ - def arg = param.value[0] - def flag = param.value[1] - build_command+= arg ? " ${flag} ${arg}" : '' - } - - for(param in OPTIONAL_BUILD_SWITCHES){ - def arg = param.value[0] - def flag = param.value[1] - build_command+= arg == 'true' ? " ${flag}" : '' - } - - build_command +=" -w ${WORKSPACE}" - // checkout the kogito-images repository in the target branch. - checkout(githubscm.resolveRepository('kogito-images', GITHUB_ORG_UNIT, BAMOE_KOGITO_IMAGE_BRANCH, false)) - - // Run the build script that should be into the operator hack folder - dir('scripts') { - util.runWithPythonVirtualEnv("./${build_command} | tee ../output.txt", 'cekit') - } - - // post processing - // query the built image from osbs using brew cli - def get_image_name = sh(returnStdout: true, script: \'\'\' - RESULT=$(/usr/bin/brew call --json-output getTaskResult $( cat output.txt| grep -oP 'Task \\\\d{8}' | cut -d" " -f2) | jq -nre "input.repositories[0]") - if [ $? != 0 ]; then - echo "Unable to find build image - $RESULT" - exit 1 - fi - # if no issue happens, the result should be the built image - echo ${RESULT} - \'\'\') - env.BUILT_IMAGE = "${get_image_name.trim()}" - } - '''.stripIndent()) - sandbox() - } - } - } -} \ No newline at end of file diff --git a/job-dsls/jobs/osbs/bamoe_operators_osbs_seed_cloud_jobs.groovy b/job-dsls/jobs/osbs/bamoe_operators_osbs_seed_cloud_jobs.groovy index 95a0d9e2..21ceb651 100644 --- a/job-dsls/jobs/osbs/bamoe_operators_osbs_seed_cloud_jobs.groovy +++ b/job-dsls/jobs/osbs/bamoe_operators_osbs_seed_cloud_jobs.groovy @@ -6,11 +6,11 @@ def folderPath = 'OSBS/bamoe-operators' folder('OSBS') folder('OSBS/bamoe-operators') // Job Description -String jobDescription = 'Job responsible for seed jobs to building bamoe ba and kogito operator images' +String jobDescription = 'Job responsible for seed jobs to building bamoe ba' //Define Variables def prodComponent = [ - 'bamoe-ba-operator', 'bamoe-kogito-operator'] + 'bamoe-ba-operator'] def buildDate = Constants.BUILD_DATE def prodVersion = Constants.BAMOE_NEXT_PROD_VERSION @@ -29,7 +29,6 @@ def cekitCacheLocal = Constants.CEKIT_CACHE_LOCAL def verbose = Constants.VERBOSE def githubOrgUnit = Constants.GITHUB_ORG_UNIT def bamoeBAOperatorBranch = Constants.BAMOE_BA_OPERTOR_BRANCH -def bamoeKogitoOperatorBranch = Constants.BAMOE_KOGITO_OPERTOR_BRANCH def bamoeBAOperatorCekitOSBSSubdir = Constants.BAMOE_BA_OPERTOR_CEKIT_OSBS_SUBDIR @@ -56,7 +55,6 @@ prodComponent.each { Component -> stringParam('VERBOSE', "${verbose}") stringParam('GITHUB_ORG_UNIT', "${githubOrgUnit}") stringParam('BAMOE_BA_OPERTOR_BRANCH', "${bamoeBAOperatorBranch}") - stringParam('BAMOE_KOGITO_OPERTOR_BRANCH', "${bamoeKogitoOperatorBranch}") stringParam('CEKIT_OSBS_SUBDIR', "${bamoeBAOperatorCekitOSBSSubdir}") } @@ -156,8 +154,6 @@ prodComponent.each { Component -> switch(prodComponent){ case { it.endsWith('ba-operator') }: return 'kie-cloud-operator' - case { it.endsWith('kogito-operator') }: - return 'kogito-operator' default: error "${prodComponent} not supported." } @@ -169,8 +165,6 @@ prodComponent.each { Component -> switch(prodComponent){ case { it.startsWith('bamoe-ba') }: return BAMOE_BA_OPERTOR_BRANCH - case { it.startsWith('bamoe-kogito') }: - return BAMOE_KOGITO_OPERTOR_BRANCH default: error "${prodComponent} not supported." } @@ -249,4 +243,4 @@ prodComponent.each { Component -> } } } -} \ No newline at end of file +} diff --git a/job-dsls/jobs/prod/prod_bamoe_create_images_templates_and_sources.groovy b/job-dsls/jobs/prod/prod_bamoe_create_images_templates_and_sources.groovy deleted file mode 100644 index 78dffcf2..00000000 --- a/job-dsls/jobs/prod/prod_bamoe_create_images_templates_and_sources.groovy +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Create the OpenShift images templates and sources -*/ -def scriptTemplate = this.getClass().getResource("job-scripts/prod_bamoe_create_images_templates_and_sources.jenkinsfile").text -def parsedScript = scriptTemplate.replaceAll(/<%=\s*(\w+)\s*%>/) { config[it[1]] ?: '' } - -def folderPath = "PROD" -folder(folderPath) - -pipelineJob("${folderPath}/bamoe-create-images-templates-and-sources") { - description('This job creates the Openshift images templates and sources for BAMOE.') - - parameters { - stringParam('VERSION', '', 'The milestone version, i.e. 8.0.3') - stringParam("PRODUCT_MILESTONE", "CR1") - stringParam('BRANCH', '7.13.x-blue', 'The OpenShift images branch used to build the images') - stringParam('BUILDS', '', 'List of Brew builds IDs separated by comma. Required images are: Business Central, Business Central Monitoring, KIE Server, Controller and Smart Router') - stringParam('OVERRIDING_FILES', 'branch-overrides.yaml', 'Comma separated list of the overriding files that will be fetched from the images repositories') - stringParam('GITHUB_REFERENCE', '', 'Override the GitHub reference for all cloned repositories') - booleanParam('UPLOAD_ARTIFACTS', true, 'If the generated artifacts should be uploaded to rcm-host') - } - - logRotator { - numToKeep(20) - } - - definition { - cps { - script(parsedScript) - sandbox() - } - } - -} \ No newline at end of file From c9bceba32abe9b1aa187939694036a00f4fbbbf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Novotn=C3=BD?= Date: Fri, 15 Nov 2024 11:42:42 +0100 Subject: [PATCH 5/7] BXMSPROD-2212: disable Kogito RHPAM images jobs/pipelines --- .../kie_tools_prerelease_branch_UMB_trigger.groovy | 2 +- .../jobs/osbs/kogito_osbs_build_pipeline_jobdsl.groovy | 6 +++++- .../osbs/rhpam_kogito_images_osbs_seed_cloud_jobs.groovy | 6 +++++- .../osbs/rhpam_operators_osbs_seed_cloud_jobs.groovy | 9 ++------- job-dsls/jobs/prod/prod_create_release_trackers.groovy | 2 +- .../jobs/prod/prod_kogito_create_images_sources.groovy | 4 +++- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/job-dsls/jobs/kie/kogito/kie_tools_prerelease_branch_UMB_trigger.groovy b/job-dsls/jobs/kie/kogito/kie_tools_prerelease_branch_UMB_trigger.groovy index c685a28f..67f783c3 100644 --- a/job-dsls/jobs/kie/kogito/kie_tools_prerelease_branch_UMB_trigger.groovy +++ b/job-dsls/jobs/kie/kogito/kie_tools_prerelease_branch_UMB_trigger.groovy @@ -1,7 +1,6 @@ /** * Creates job that triggers when a new `---prerelease` branch is pushed to kie-tools repository and notifies QE of this by sending and UMB message. - */ import org.kie.jenkins.jobdsl.Constants def repo = "kie-tools" @@ -118,3 +117,4 @@ job(jobName) { } } } +*/ \ No newline at end of file diff --git a/job-dsls/jobs/osbs/kogito_osbs_build_pipeline_jobdsl.groovy b/job-dsls/jobs/osbs/kogito_osbs_build_pipeline_jobdsl.groovy index adcbfa9f..a3f65783 100644 --- a/job-dsls/jobs/osbs/kogito_osbs_build_pipeline_jobdsl.groovy +++ b/job-dsls/jobs/osbs/kogito_osbs_build_pipeline_jobdsl.groovy @@ -1,3 +1,6 @@ +/** + COMMENTING THIS TO DISABLE/REMOVE THIS JOB + import org.kie.jenkins.jobdsl.Constants def folderPath = 'OSBS' @@ -92,4 +95,5 @@ String getBlueSuffix(String version, String separator) { boolean isMainBranchVersion(String version) { return [Constants.MAIN_BRANCH_PROD_VERSION, Constants.KOGITO_MAIN_BRANCH_PROD_VERSION, Constants.RHBOP_MAIN_BRANCH_PROD_VERSION].contains(version) -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/job-dsls/jobs/osbs/rhpam_kogito_images_osbs_seed_cloud_jobs.groovy b/job-dsls/jobs/osbs/rhpam_kogito_images_osbs_seed_cloud_jobs.groovy index 8db8b3f8..40f1bb8e 100644 --- a/job-dsls/jobs/osbs/rhpam_kogito_images_osbs_seed_cloud_jobs.groovy +++ b/job-dsls/jobs/osbs/rhpam_kogito_images_osbs_seed_cloud_jobs.groovy @@ -1,3 +1,6 @@ +/** +COMMENTING THIS TO DISABLE/REMOVE THIS JOB for RHPAM + package osbs import org.kie.jenkins.jobdsl.Constants @@ -218,4 +221,5 @@ prodComponent.each { Component -> } } } -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/job-dsls/jobs/osbs/rhpam_operators_osbs_seed_cloud_jobs.groovy b/job-dsls/jobs/osbs/rhpam_operators_osbs_seed_cloud_jobs.groovy index a9c576c8..795961d0 100644 --- a/job-dsls/jobs/osbs/rhpam_operators_osbs_seed_cloud_jobs.groovy +++ b/job-dsls/jobs/osbs/rhpam_operators_osbs_seed_cloud_jobs.groovy @@ -6,11 +6,11 @@ def folderPath = 'OSBS/rhpam-operators' folder('OSBS') folder('OSBS/rhpam-operators') // Job Description -String jobDescription = 'Job responsible for seed jobs to building rhpam and kogito operator images' +String jobDescription = 'Job responsible for seed jobs to building rhpam images' //Define Variables def prodComponent = [ - 'rhpam-ba-operator', 'rhpam-kogito-operator'] + 'rhpam-ba-operator'] def buildDate = Constants.BUILD_DATE def prodVersion = Constants.NEXT_PROD_VERSION @@ -52,7 +52,6 @@ prodComponent.each { Component -> stringParam('CEKIT_CACHE_LOCAL', "${cekitCacheLocal}") stringParam('VERBOSE', "${verbose}") stringParam('GITHUB_ORG_UNIT', "${githubOrgUnit}") - stringParam('RHPAM_KOGITO_OPERTOR_BRANCH', "${rhpamKogitoOperatorBranch}") stringParam('CEKIT_OSBS_SUBDIR', "${rhpamBAOperatorCekitOSBSSubdir}") } @@ -151,8 +150,6 @@ prodComponent.each { Component -> switch(prodComponent){ case { it.endsWith('ba-operator') }: return 'kie-cloud-operator' - case { it.endsWith('kogito-operator') }: - return 'kogito-operator' default: error "${prodComponent} not supported." } @@ -164,8 +161,6 @@ prodComponent.each { Component -> switch(prodComponent){ case { it.startsWith('rhpam-ba') }: return 'main' - case { it.startsWith('rhpam-kogito') }: - return RHPAM_KOGITO_OPERTOR_BRANCH default: error "${prodComponent} not supported." } diff --git a/job-dsls/jobs/prod/prod_create_release_trackers.groovy b/job-dsls/jobs/prod/prod_create_release_trackers.groovy index 9e5e6a1c..796ebbf6 100644 --- a/job-dsls/jobs/prod/prod_create_release_trackers.groovy +++ b/job-dsls/jobs/prod/prod_create_release_trackers.groovy @@ -12,7 +12,7 @@ pipelineJob("${folderPath}/create-release-trackers") { parameters { stringParam('VERSION', '', ' The release candidate version, i.e. 7.12.1.CR1') - choiceParam('TEMPLATE', ['rhba', 'rhba_kogito', 'bamoe_kogito', 'rhbop'], 'The template file that describes the tickets that will be created') + choiceParam('TEMPLATE', ['rhba', 'rhbop'], 'The template file that describes the tickets that will be created') } logRotator { diff --git a/job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy b/job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy index 1cce03b6..62a94745 100644 --- a/job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy +++ b/job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy @@ -1,6 +1,7 @@ /** * Create the OpenShift images sources */ +/** COMMENTING TO EFFECTIVELY REMOVE THIS job def scriptTemplate = this.getClass().getResource("job-scripts/prod_kogito_create_images_sources.jenkinsfile").text def parsedScript = scriptTemplate.replaceAll(/<%=\s*(\w+)\s*%>/) { config[it[1]] ?: '' } @@ -31,4 +32,5 @@ pipelineJob("${folderPath}/kogito-create-images-sources") { } } -} \ No newline at end of file +} +*/ \ No newline at end of file From 6452dd59684a728a59fc9c40379573baff64faf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Novotn=C3=BD?= Date: Fri, 15 Nov 2024 13:25:03 +0100 Subject: [PATCH 6/7] renamed kie-tools to tools-kie-ci as to not confuse with kie-tools repository --- .../{kie-tools => tools-kie-ci}/kieAll_meta_pipeline.groovy | 4 ++-- .../send_UMB_trigger_after_version_upgrade.groovy | 0 .../upgradeVersions/deploy_SNAPSHOT_version.groovy | 0 .../upgradeVersions/kie_meta_upgrade_pipeline.groovy | 0 .../upgradeVersions/newBranch_kie_benchmarks.groovy | 0 .../upgradeVersions/upgradeAll_kiegroup.groovy | 0 .../upgradeVersions/upgrade_business_central.groovy | 0 .../upgradeVersions/upgrade_kie_benchmarks.groovy | 0 .../upgradeVersions/upgrade_kie_cloud_tests.groovy | 0 .../upgradeVersions/upgrade_kie_prefix.groovy | 0 .../upgradeVersions/upgrade_start_jbpm_org.groovy | 0 11 files changed, 2 insertions(+), 2 deletions(-) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/kieAll_meta_pipeline.groovy (97%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/send_UMB_trigger_after_version_upgrade.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/deploy_SNAPSHOT_version.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/kie_meta_upgrade_pipeline.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/newBranch_kie_benchmarks.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/upgradeAll_kiegroup.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/upgrade_business_central.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/upgrade_kie_benchmarks.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/upgrade_kie_cloud_tests.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/upgrade_kie_prefix.groovy (100%) rename job-dsls/jobs/kie/{kie-tools => tools-kie-ci}/upgradeVersions/upgrade_start_jbpm_org.groovy (100%) diff --git a/job-dsls/jobs/kie/kie-tools/kieAll_meta_pipeline.groovy b/job-dsls/jobs/kie/tools-kie-ci/kieAll_meta_pipeline.groovy similarity index 97% rename from job-dsls/jobs/kie/kie-tools/kieAll_meta_pipeline.groovy rename to job-dsls/jobs/kie/tools-kie-ci/kieAll_meta_pipeline.groovy index b00a38af..c69e3d3d 100644 --- a/job-dsls/jobs/kie/kie-tools/kieAll_meta_pipeline.groovy +++ b/job-dsls/jobs/kie/tools-kie-ci/kieAll_meta_pipeline.groovy @@ -42,8 +42,8 @@ pipeline{ """ // creates folder if is not existing folder("KIE") -folder("KIE/kie-tools") -def folderPath="KIE/kie-tools" +folder("KIE/tools-kie-ci") +def folderPath="KIE/tools-kie-ci" pipelineJob("${folderPath}/kieAll_meta_pipeline") { diff --git a/job-dsls/jobs/kie/kie-tools/send_UMB_trigger_after_version_upgrade.groovy b/job-dsls/jobs/kie/tools-kie-ci/send_UMB_trigger_after_version_upgrade.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/send_UMB_trigger_after_version_upgrade.groovy rename to job-dsls/jobs/kie/tools-kie-ci/send_UMB_trigger_after_version_upgrade.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/deploy_SNAPSHOT_version.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/deploy_SNAPSHOT_version.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/deploy_SNAPSHOT_version.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/deploy_SNAPSHOT_version.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/kie_meta_upgrade_pipeline.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/kie_meta_upgrade_pipeline.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/kie_meta_upgrade_pipeline.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/kie_meta_upgrade_pipeline.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/newBranch_kie_benchmarks.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/newBranch_kie_benchmarks.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/newBranch_kie_benchmarks.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/newBranch_kie_benchmarks.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/upgradeAll_kiegroup.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgradeAll_kiegroup.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/upgradeAll_kiegroup.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgradeAll_kiegroup.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_business_central.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_business_central.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_business_central.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_business_central.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_kie_benchmarks.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_kie_benchmarks.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_kie_benchmarks.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_kie_benchmarks.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_kie_cloud_tests.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_kie_cloud_tests.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_kie_cloud_tests.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_kie_cloud_tests.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_kie_prefix.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_kie_prefix.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_kie_prefix.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_kie_prefix.groovy diff --git a/job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_start_jbpm_org.groovy b/job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_start_jbpm_org.groovy similarity index 100% rename from job-dsls/jobs/kie/kie-tools/upgradeVersions/upgrade_start_jbpm_org.groovy rename to job-dsls/jobs/kie/tools-kie-ci/upgradeVersions/upgrade_start_jbpm_org.groovy From 4997ba9a36cf71a4d904d6f358df42736f657141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Novotn=C3=BD?= Date: Mon, 18 Nov 2024 09:31:47 +0100 Subject: [PATCH 7/7] removed also KogitoNightly --- .../prod/prod_cron_meta_nightly_rhpam_pipeline.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/job-dsls/jobs/prod/prod_cron_meta_nightly_rhpam_pipeline.groovy b/job-dsls/jobs/prod/prod_cron_meta_nightly_rhpam_pipeline.groovy index 76ee9091..94766829 100644 --- a/job-dsls/jobs/prod/prod_cron_meta_nightly_rhpam_pipeline.groovy +++ b/job-dsls/jobs/prod/prod_cron_meta_nightly_rhpam_pipeline.groovy @@ -15,9 +15,9 @@ def NEXT_PRODUCT_CONFIG_BRANCH="rhba/${NEXT_PRODUCT_BRANCH}" // def NEXT_RHBA_VERSION_PREFIX=Constants.RHBA_VERSION_PREFIX def NEXT_RHBA_VERSION_PREFIX='7.67.1.redhat-' -def KOGITO_NEXT_PRODUCT_VERSION='1.13.0' -def KOGITO_NEXT_PRODUCT_BRANCH='1.13.x' -def KOGITO_NEXT_PRODUCT_CONFIG_BRANCH="kogito/${KOGITO_NEXT_PRODUCT_BRANCH}" +//def KOGITO_NEXT_PRODUCT_VERSION='1.13.0' +//def KOGITO_NEXT_PRODUCT_BRANCH='1.13.x' +//def KOGITO_NEXT_PRODUCT_CONFIG_BRANCH="kogito/${KOGITO_NEXT_PRODUCT_BRANCH}" def OPTAPLANNER_NEXT_PRODUCT_VERSION='8.13.0' @@ -47,7 +47,7 @@ pipeline{ stages { ${rhbaNightlyStage(NEXT_PRODUCT_VERSION, NEXT_PRODUCT_BRANCH, NEXT_PRODUCT_CONFIG_BRANCH)} - ${kogitoNightlyStage(KOGITO_NEXT_PRODUCT_VERSION, KOGITO_NEXT_PRODUCT_BRANCH, OPTAPLANNER_NEXT_PRODUCT_VERSION, NEXT_PRODUCT_VERSION, NEXT_RHBA_VERSION_PREFIX, KOGITO_NEXT_PRODUCT_CONFIG_BRANCH)} + //{kogitoNightlyStage(KOGITO_NEXT_PRODUCT_VERSION, KOGITO_NEXT_PRODUCT_BRANCH, OPTAPLANNER_NEXT_PRODUCT_VERSION, NEXT_PRODUCT_VERSION, NEXT_RHBA_VERSION_PREFIX, KOGITO_NEXT_PRODUCT_CONFIG_BRANCH)} // blue ${rhbaNightlyStage(NEXT_BLUE_PRODUCT_VERSION, NEXT_BLUE_PRODUCT_BRANCH, NEXT_BLUE_PRODUCT_CONFIG_BRANCH)}