From 9ea63c5f54e2e361ed53f35e58116fecfc76195a Mon Sep 17 00:00:00 2001 From: Roberto Oliveira Date: Mon, 21 Aug 2023 10:51:13 +0200 Subject: [PATCH 1/2] [BXMSPROD-2105] parametrize the OpenShift images branch used to build the images in jobs that create templates and sources --- .../prod/prod_bamoe_create_images_templates_and_sources.groovy | 1 + .../jobs/prod/prod_bamoe_kogito_create_images_sources.groovy | 1 + .../jobs/prod/prod_create_images_templates_and_sources.groovy | 1 + job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy | 1 + .../prod_bamoe_create_images_templates_and_sources.jenkinsfile | 3 ++- .../prod_bamoe_kogito_create_images_sources.jenkinsfile | 3 ++- .../prod_create_images_templates_and_sources.jenkinsfile | 3 ++- .../job-scripts/prod_kogito_create_images_sources.jenkinsfile | 3 ++- 8 files changed, 12 insertions(+), 4 deletions(-) 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 index 014169804..b42eed3f0 100644 --- 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 @@ -13,6 +13,7 @@ pipelineJob("${folderPath}/bamoe-create-images-templates-and-sources") { 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') 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 index 5a10cc734..942422840 100644 --- a/job-dsls/jobs/prod/prod_bamoe_kogito_create_images_sources.groovy +++ b/job-dsls/jobs/prod/prod_bamoe_kogito_create_images_sources.groovy @@ -14,6 +14,7 @@ pipelineJob("${folderPath}/bamoe-kogito-create-images-sources") { 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') diff --git a/job-dsls/jobs/prod/prod_create_images_templates_and_sources.groovy b/job-dsls/jobs/prod/prod_create_images_templates_and_sources.groovy index 07f578a67..c09330041 100644 --- a/job-dsls/jobs/prod/prod_create_images_templates_and_sources.groovy +++ b/job-dsls/jobs/prod/prod_create_images_templates_and_sources.groovy @@ -13,6 +13,7 @@ pipelineJob("${folderPath}/create-images-templates-and-sources") { parameters { stringParam('VERSION', '', ' The milestone version, i.e. 7.12.1') stringParam("PRODUCT_MILESTONE", "CR1") + stringParam('BRANCH', '7.13.x', ' 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') 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 30d3a1314..2fb204c14 100644 --- a/job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy +++ b/job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy @@ -13,6 +13,7 @@ pipelineJob("${folderPath}/kogito-create-images-sources") { parameters { stringParam('VERSION', '', ' The milestone version, i.e. 1.13.1') stringParam("PRODUCT_MILESTONE", "CR1") + stringParam('BRANCH', '1.13.x', ' 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', 'rhpam-kogito-runtime-jvm-rhel8-overrides.yaml,rhpam-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') 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 index 1191fd0d1..ba25ab827 100644 --- 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 @@ -16,6 +16,7 @@ pipeline { 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}" @@ -34,7 +35,7 @@ pipeline { 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} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') + util.runWithPythonVirtualEnv("python3 GenerateOpenshiftSrc.py --product rhpam --builds ${BUILDS} --version ${VERSION} --branch ${BRANCH} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') } } } 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 index 1d894953a..6e424d62f 100644 --- 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 @@ -17,6 +17,7 @@ pipeline { 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}" @@ -35,7 +36,7 @@ pipeline { 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} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') + util.runWithPythonVirtualEnv("python3 GenerateOpenshiftSrc.py --product kogito --builds ${BUILDS} --version ${VERSION} --branch ${BRANCH} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') } } } diff --git a/job-dsls/src/main/resources/job-scripts/prod_create_images_templates_and_sources.jenkinsfile b/job-dsls/src/main/resources/job-scripts/prod_create_images_templates_and_sources.jenkinsfile index 764fc25e1..a3accba1e 100644 --- a/job-dsls/src/main/resources/job-scripts/prod_create_images_templates_and_sources.jenkinsfile +++ b/job-dsls/src/main/resources/job-scripts/prod_create_images_templates_and_sources.jenkinsfile @@ -16,6 +16,7 @@ pipeline { 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}" @@ -34,7 +35,7 @@ pipeline { 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} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') + util.runWithPythonVirtualEnv("python3 GenerateOpenshiftSrc.py --product rhpam --builds ${BUILDS} --version ${VERSION} --branch ${BRANCH} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') } } } diff --git a/job-dsls/src/main/resources/job-scripts/prod_kogito_create_images_sources.jenkinsfile b/job-dsls/src/main/resources/job-scripts/prod_kogito_create_images_sources.jenkinsfile index 6344d74ec..0196c6418 100644 --- a/job-dsls/src/main/resources/job-scripts/prod_kogito_create_images_sources.jenkinsfile +++ b/job-dsls/src/main/resources/job-scripts/prod_kogito_create_images_sources.jenkinsfile @@ -16,6 +16,7 @@ pipeline { 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}" @@ -34,7 +35,7 @@ pipeline { 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} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') + util.runWithPythonVirtualEnv("python3 GenerateOpenshiftSrc.py --product kogito --builds ${BUILDS} --version ${VERSION} --branch ${BRANCH} --of ${OVERRIDING_FILES} ${OPTIONAL_PARAMS}", 'rhba-prod') } } } From f11b7282dbc6436d0d76566ce43fd0b86cf1aa51 Mon Sep 17 00:00:00 2001 From: Roberto Oliveira Date: Mon, 21 Aug 2023 11:09:54 +0200 Subject: [PATCH 2/2] remove extra spaces in parameters description --- .../prod_bamoe_create_images_templates_and_sources.groovy | 4 ++-- .../prod/prod_bamoe_kogito_create_images_sources.groovy | 6 +++--- .../prod/prod_create_images_templates_and_sources.groovy | 4 ++-- job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) 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 index b42eed3f0..78dffcf2b 100644 --- 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 @@ -11,9 +11,9 @@ 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('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('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') 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 index 942422840..e89e5e3c5 100644 --- a/job-dsls/jobs/prod/prod_bamoe_kogito_create_images_sources.groovy +++ b/job-dsls/jobs/prod/prod_bamoe_kogito_create_images_sources.groovy @@ -11,10 +11,10 @@ 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('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('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') diff --git a/job-dsls/jobs/prod/prod_create_images_templates_and_sources.groovy b/job-dsls/jobs/prod/prod_create_images_templates_and_sources.groovy index c09330041..5a4774e7b 100644 --- a/job-dsls/jobs/prod/prod_create_images_templates_and_sources.groovy +++ b/job-dsls/jobs/prod/prod_create_images_templates_and_sources.groovy @@ -11,9 +11,9 @@ pipelineJob("${folderPath}/create-images-templates-and-sources") { description('This job creates the Openshift images templates and sources for RHPAM.') parameters { - stringParam('VERSION', '', ' The milestone version, i.e. 7.12.1') + stringParam('VERSION', '', 'The milestone version, i.e. 7.12.1') stringParam("PRODUCT_MILESTONE", "CR1") - stringParam('BRANCH', '7.13.x', ' The OpenShift images branch used to build the images') + stringParam('BRANCH', '7.13.x', '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') 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 2fb204c14..1cce03b6a 100644 --- a/job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy +++ b/job-dsls/jobs/prod/prod_kogito_create_images_sources.groovy @@ -11,9 +11,9 @@ pipelineJob("${folderPath}/kogito-create-images-sources") { description('This job creates the Openshift sources for Kogito.') parameters { - stringParam('VERSION', '', ' The milestone version, i.e. 1.13.1') + stringParam('VERSION', '', 'The milestone version, i.e. 1.13.1') stringParam("PRODUCT_MILESTONE", "CR1") - stringParam('BRANCH', '1.13.x', ' The OpenShift images branch used to build the images') + stringParam('BRANCH', '1.13.x', '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', 'rhpam-kogito-runtime-jvm-rhel8-overrides.yaml,rhpam-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')